Jamie Dimon took high heat over his 74 percent mega-raise, but he’s not at fault. The blame goes to a 1993 boondoggle for bigwigs—a boondoggle that’s cost taxpayers by the billions ever since. Congress should call a halt, and the country’s mood could push it to do just that.

Ironically, the law that launched the boondoggle started out aiming to do the opposite. Lavish corporate pay packages had turned off many Americans as the 1990s began. To fight the trend, the ’92 Clinton-Gore campaign proposed a $1 million cap on the tax deductibility of salaries paid to a firm’s top echelon. Companies have an absolute right to set executive pay. Congress likewise has the right to limit the amount that qualifies as a corporate tax write-off. Once elected, Clinton moved to enact the reform.

The final result—Section 162(m) of the Internal Revenue Code—ended up delivering gold to the corporate elite and a slap in the face to America’s taxpayers. The statute did impose a $1 million deductibility cap on publicly held corporations, but it also created a huge loophole. It wrote into law what quickly became the most gilded words in the gilded world of executive compensation: performance-based pay.

As long as the pay meets IRS benchmarks for “performance-based,” its deductibility is unlimited. Boards of directors routinely find ways to hand out mega-million packages of stock grants, stock options, profit-sharing, stock appreciation rights, every imaginable kind of executive sweetener. Twenty years on, after three presidencies and six administrations, Section 162(m) stands as a classic example of good intentions leading to bad endings.

A 2012 study by the Economic Policy Institute estimates that Section 162(m) is costing the Treasury about $5 billion a year. A fair number of companies ignore the salary cap and pay more in taxes, but that revenue gets swamped by the shortfall from deductible corporate pay. The Treasury’s wounds from 162(m) have festered forever. With inequality soaring, a few in Congress are finally going after a law that works overtime to drive it higher.

In August 2013, Sens. Jack Reed (D-R.I.) and Richard Blumenthal (D-Conn.) introduced the Stop Subsidizing Multimillion Dollar Corporate Bonuses Act. Blunt title, blunt purpose: “This legislation would close a major loophole in current corporate tax law by putting an end to unlimited tax write-offs on performance-based executive pay.” The bill calls for a blanket $1 million deductibility cap. As Blumenthal noted, corporations are free to “pay their executives whatever they wish, just not at the expense of American taxpayers…” (The same thinking, under the heading “Stop Subsidies for Excessive Compensation,” appears in the tax reform plan just unveiled by the GOP members of the House Ways and Means Committee. Its remedies take aim as well at huge non-profit salaries. )

Rep. Lloyd Doggett (D-Texas) introduced a House version of the Reed-Blumenthal bill earlier this year. “Most Americans,” Doggett said, “would probably be surprised to learn that multimillion dollar executive bonuses are currently tax write-offs.”

Most Americans might be surprised, but legislators in both parties know only too well. Sen. Chuck Grassley (R-Iowa) formerly chaired the Senate Finance Committee. As the 2006 chair, he admitted that Section 162(m) “really hasn’t worked at all. Companies have found it easy to get around…It has more holes than Swiss cheese. And it seems to have encouraged the options industry.” Options are a big part of performance pay. In 2009, Sens. John McCain (R-Ariz.) and Carl Levin (D-Mich.) introduced an options bill to “eliminate a tax incentive [Section 162(m)] that encourages corporate boards to hand out huge executive stock option pay…”

Section 162(m) has failed as tax policy, but it does two things to perfection: it runs up federal red ink, and it shows contempt for taxpayers. Better late than never, Congress should act to stop the bleeding and end the long, long insult.