Our government isn’t very good at knowing when and how to change bankruptcy law, and every time it contemplates doing so it makes the wrong decision. With Puerto Rico staring at insolvency and Congress debating some sort of relief for the island, it appears this dubious streak may remain intact.

The commonwealth’s government, in case you haven’t kept track, is broke. A decade-long recession and profligate spending will do that. It wants Congress to give it a mechanism to reorganize its debts. Chapter 9 of the bankruptcy code allows municipalities, utilities, and government entities of the 50 states to receive bankruptcy protection, but a state cannot reorganize its own general obligation debt. For reasons no one can quite recall, Chapter 9 does not apply to U.S. territories.

Some people (including myself) proposed last year that the federal government extend Chapter 9 to Puerto Rico. Doing so would provide it enough breathing room to reform its finances, given that only $20 billion of the island’s $72 billion of total debt consists of the general obligation debt exempt from Chapter 9. Others—most notably the Heritage Foundation—argued against the unfairness (to lenders) of what would essentially be an ex post change in the debt agreements. They’re not wrong, but given the perilous nature of the island’s finances, an extension of Chapter 9 is the least-bad option available, and it would prevent the need for a federal bailout.

However, the Treasury contends that merely extending Chapter 9 to Puerto Rico is insufficient, and it is pressing Congress to allow it to haircut all of Puerto Rico’s debt, including general obligations. Treasury and the House members who advocate this debt-cramming insist it would be a one-off that would not apply to the states and would not be a precedent affecting future efforts by states to reorganize their debts.

That assumes a future Congress would never seek to change the bankruptcy code when an insolvent state arrives as a supplicant on its steps. When Illinois finds it difficult to pay its general obligation debt a few years from now, would Congress offer a bailout or seek to change the bankruptcy code along the same lines as in Puerto Rico? The superficial way Congress will paper over the issue in the current legislation is by not explicitly creating a mechanism to reduce general obligation debt but instead allowing a fiscal control board to do the dirty work, and instructing it to “respect” credit priorities, whatever that means.

But the current debate involves a more general issue: When is it appropriate to change the rules governing bankruptcy, given that it fundamentally alters existing contractual relationships? Contemplating such a question is not uncommon. Several times, Congress has changed what debt can and cannot be discharged during bankruptcy, and most of these changes have been counterproductive. For instance, in the 1970s Congress made it much more difficult to escape student loan debt via bankruptcy, fearful that soon-to-be-wealthy medical students were gaming the system. Doing so changed the terms of billions of dollars of student debt ex post from being dischargeable in bankruptcy to being completely protected. The move made it easier for students to get loans, even to schools where they had little hope of graduating or for degrees unlikely to pay off in higher future wages. The amount of student debt grew precipitously, as did the amount of debt under technical default, and today the accumulated student debt exceeds $1 trillion. The change also contributed to boosting tuition prices across the country.

Three decades later Congress did the same thing to tens of billions of dollars of consumer debt when it required all bankruptcy filers with an income above the median to file a Chapter 13 reorganization—which requires the debtor to agree to a repayment plan with his creditors to pay most or all of the debt incurred—instead of an ordinary Chapter 7 bankruptcy. In essence, people who incurred consumer debt earlier in the decade saw what had been unsecured debt transformed into secured debt.

What’s most frustrating about this history of changing the bankruptcy rules is that when such a change actually made good economic sense, people suddenly got religion on the errors of rewriting the rules in the middle of a game. In 2008 many in Congress—as well as my boss at the time, Treasury Secretary Hank Paulson—cited the inviolability of debt laws when they rejected proposals that would have allowed homeowners who were under water to do a modified “cram down” of their home mortgage obligations in a Chapter 13 bankruptcy.

The argument for doing such a thing (besides the fact that bankruptcy law allows it to be done for all other property) is that someone who owed $600,000 on a $400,000 home—a not uncommon situation in 2008—was unlikely to keep paying on his house. At some point the futility of doing such a thing would become apparent and he would cease payments, beginning the long, drawn-out process of eviction, which can take years in some states.

Far better would have been to acknowledge the reality that whoever held the $600,000 note on the house worth $400,000 would more likely than not receive only $400,000. And the most expeditious way to resolve this would be to permit the current owner to continue living in the place, making reduced payments, rather than go through the costly rigmarole of eviction, only to bring in someone else to pay $400,000 for the house two years later. Paulson and others, however, suggested that such an action was “immoral,” and we held tightly to this dubious morality tale rather than pursuing a mechanism that would have righted the housing market more quickly.

Sometimes changing the bankruptcy law is the least bad option available. But in so doing, we should contemplate its long-run consequences for everyone involved, as well as for those not involved. Creating something akin to a super Chapter 9 bankruptcy for Puerto Rico that allows it to reduce all of its debts—including the general obligation debts protected by the commonwealth’s constitution—would be a terrible precedent. Municipal bondholders in fiscally troubled states like Illinois would come to fear such a solution could be imposed on them as well, and the state’s borrowing costs would increase, bringing its day of reckoning ever closer and making a general obligation debt reduction even more likely.

Extending ordinary Chapter 9 bankruptcy to Puerto Rico would enable it to distinguish between general obligation debt and all other debt—to give a haircut to the latter, while fully honoring the former. To give it a super Chapter 9 via a fiscal control board that treats all debt the same may please a few lenders. But it has a high potential cost—all U.S. citizens would probably end up paying to make those lenders whole. It would be yet another example of Congress making the wrong decision when it comes to modifying bankruptcy law.