It's not as bad as Meredith Whitney predicted it would be. But investors should watch their step when it comes to investing in municipal bonds.

Whitney, you may remember, was the high-profile research analyst who, in a 2010 interview on 60 Minutes, predicted that as many as 100 state and local governments would default within a year's time, putting hundreds of billions of bondholders money at risk.

That never happened. At least not as quickly and less dramatically as Whitney predicted. But tectonic plates are indeed shifting in the world of municipal bonds. It's a world many investors have historically turned to because of the perceived safety and credit worthiness of governmental borrowers and because of the tax-free nature of the interest they pay.

Currently in the spotlight is the Commonwealth of Puerto Rico, whose bonds are widely held because they are exempt from city, state and federal taxes no matter where investors live. The territory is the most recent US government unit to go through bankruptcy, and the process could well rewrite the rules of government credit investors once thought they could rely on.

Puerto Rico owes $74 billion in various types of public debt that they can't even come close to repaying. Last year, Congress passed the Puerto Rico Oversight, Management and Economic Stability Act (PROMESA), placing Puerto Rico's finances under the control of a seven-member oversight board based on a similar model imposed on Washington, DC in the 1990s. The PROMESA board will attempt to restructure the island's debt in an orderly and logical way and try to place it on the path to fiscal stability going forward.

As in previous bankruptcy-like proceedings involving governmental entities -- Stockton (CA), Jefferson County (AL) or Detroit (MI) -- Puerto Rico's restructuring involves complex and unsettled questions about which kind of creditors get paid in what order when a government can't pay its bills. The list of creditors includes:

--holders of General Obligation ("GO") Bonds, to which Puerto Rico pledged its "full faith and credit" and promised to repay from any and all available resources;

--holders of sales tax revenue bonds (known in Puerto Rico's case as "Cofina" bonds), who are counting on sales taxes to get paid. Those are the same sales tax revenues that GO bondholders believe belong to them; and

--holders of various types of revenue bonds, which rely on specific revenue streams for repayment. These include so-called "Prepa" and "Prasa" bonds issued by the island's electric and water utilities.

The questions of who gets paid first, and out of what revenues, are further complicated by two factors. First, disputes about whether officials violated constitutional limitations in issuing certain types of bonds. Second, and perhaps more important, is the gross underfunding of Puerto Rico's public pension plans. (By some estimates they have less than a penny of assets for each dollar of liabilities.) Pensioners--whose claims have a net present value of over $40 billion--constitute a huge and politically powerful class of unsecured creditors vying with bondholders to get Puerto Rico to honor its financial promises.

In Detroit--which declared bankruptcy but settled with its major creditors before similar issues were resolved in a court of law--the city's pension funds were overall treated more favorably than many bondholders, despite their status as unsecured creditors. Holders of the city's water and sewer revenue bonds received 100 percent of what they were owed. Holders of GO bonds, which have historically been considered the most senior and secure of all bonds governments sell to investors , received about 75 percent. Limited tax bondholders received about two thirds of face value.

Why does all this matter? Because Puerto Rico and Detroit are hardly going to be the last US local governments to default on their debt and go through bankruptcy. (The State of Illinois is often named as the next most likely prospect.)

In the $3.7 trillion muni market, default rates continue to be much lower than in other markets. But a "State and Local Government's Fiscal Outlook--2016 Update" report by the Government Accountability Office paints a sobering picture: "Absent any intervention or policy changes, state and local governments are facing... a gap between receipts and expenditures in coming years," the reports states. At the same time, "pension plans have experienced a growing gap between assets and liabilities over the long term."

What is troubling is not simply the financial stress state and local governments are facing. That can be addressed if elected officials take action. Rather, it's that (1) established rules about payment priority in the municipal market are being stood on their head; (2) new rules have yet to take their place; (3) and repayment decisions are, ultimately, going to be heavily driven by politics.

We seem to be entering a brave new world in which governmental restructurings are highly local, determined on a case-by-case basis without precedent to help investors predict what will happen.

Whether investors realize it or not, this is creating a daunting "buyer beware" environment for municipal bond investors who, every time they invest, are making an evaluation about whether or not they will get interest and get their money back at maturity.

For the time being, at least, there is and will continue to be an uncertainty premium in the municipal bond market. The unknowns are significant enough investors would be well advised to stick with the highest quality credits even though yields today may be lower than you like, particularly for bonds with short and intermediate maturities.

Stay away from bonds issued by governments with large unfunded pensions. Retired employees will prove to be formidable advocates for why they should get paid as much as or more than you and your fellow bondholders.

Finally, the days of a "set and forget" approach to bond investing are long gone. Investors should have their portfolios carefully reviewed at least once a year by credit analysts. As Morgan Stanley strategist Barton Biggs was fond of saying: "Anticipate the anticipation of trouble."