Banks and corporations would no longer be able to claim tax deductions for certain payments made under legal settlements with the U.S. government involving alleged business misconduct, under bipartisan legislation offered on Wednesday in the U.S. Senate.

Senators Charles Grassley and Jack Reed offered the bill. “Congress needs to close this settlement loophole,” said Reed, a Democrat, in a statement.

Grassley, a Republican, has previously introduced similar legislation and it has failed to win passage and become law.

Under present law, banks and corporations may not deduct from their taxable income the costs of paying fines and penalties directly to the federal government. But they may write off payments that are not made directly to the government.

For example, JPMorgan may be able to get a deduction for $4 billion in aid to struggling mortgage borrowers it would pay as part of a proposed settlement, Reuters reported.

JPMorgan has been negotiating with the Justice Department over the details of a $13 billion settlement over the bank’s mortgage bonds. Tax deductibility has been a sensitive issue in these settlement talks, sources have told Reuters.

A JPMorgan spokesman declined to comment on the bill.

The Justice Department did not immediately respond to requests for a comment.

On Tuesday, Democratic Senator Bill Nelson called on congressional budget negotiators to consider closing the settlement deductibility loophole.

Though the Reed-Grassley bill faces long odds, regulators are already getting tougher on the tax deductibility issue in recent settlements, said Robert Wood, a tax lawyer who has written about the issue.

This week’s settlement between SAC Capital Advisors and federal regulators, a $1.2 billion deal, barred the company from claiming cost-related tax deductions, Wood said.

“There is more sensitivity to this now,” Wood said. “Maybe, by attrition, Grassley is winning.”

The consumer advocacy group Public Citizen praised the Reed-Grassley bill. “A corporate penalty is effective only if it hits the company where it hurts: in their bottom line,” said Lisa Gilbert, a director with the good government watchdog group.