It looks like some clever Freddie Mac shareholders may have actually got some of their money back, in compensation for the government’s effective nationalization of the mortgage finance giant in August 2012, which wiped out virtually all the value of their stock.

The money—or whatever the investors got in a confidential lawsuit settlement that was first announced to the judge on October 11 and then apparently completed by October 18, when the parties agreed to dismiss the case—didn’t come from the government itself, but rather from Freddie’s auditor from 2008 to 2013, PricewaterhouseCoopers, which was the sole defendant in the suit.

Nevertheless, Uncle Sam is mad about the deal. The government is trying to find out exactly what its terms were—and possibly to undo it. The Federal Housing Finance Agency, which has been Freddie Mac’s conservator since 2008, has asked a Miami federal judge to reopen the case in order to dismiss it again, but this time “without payment of any kind,” as it papers explain.

The odd dispute arose in one of the satellite lawsuits stemming from the government’s confiscation, in essence, of both Fannie Mae fnma and Freddie Mac fmcc in 2012, when it dramatically changed the terms of a federal bailout of the two government-sponsored enterprises (GSEs), which began in 2008. (Fannie Mae is the popular name for the Federal National Mortgage Association and Freddie Mac refers to the Federal Home Loan Mortgage Corporation.)

U.S. District Judge Federico Moreno of Miami has scheduled a hearing Monday morning to decide what to do. The plaintiffs—23 individual investors plus investment managers Gator Capital, of Tampa, and Perini Capital, of Miami—are arguing that the judge no longer has jurisdiction, because the parties agreed to dismiss the case last Tuesday.

The shareholders sued PwC in March, claiming, in effect, that it helped federal regulators both to seize Freddie Mac in 2008 and to nationalize it is 2012—when it first became clear that the government had no intention of ever letting the GSEs pay back their debts and reemerge as independent companies—by portraying it as being in worse financial shape than it really was.

Specifically, the suit alleges that PwC “assisted government regulators and officers of Freddie Mac to destroy the value of Freddie Mac stock” by “manipulating the books . . . to overstate losses and understate its assets by hundreds of billions of dollars.” The suit alleges that these acts amounted to “negligent misrepresentations” and “aiding and abetting” of fiduciary breaches by Freddie’s own directors and by the federal officials who took over from them in 2008. A PwC spokeswoman said she couldn’t comment on any aspect of the suit due to a confidentiality agreement reached as part of the settlement. (The suit never reached the stage where PwC filed an answer in court responding to the accusations. FHFA and Treasury have denied any wrongdoing in numerous other suits.)

A few days before the suit against PwC was filed last March, a nearly identical suit was filed by Gator, Perini, and about 30 individuals—including some of the same ones—against Fannie Mae’s auditors, Deloitte & Touche. No settlement has been reached in that case.

To understand the whole mess, we need to take a couple steps back. In September 2008, as the nation’s economic system descended into crisis, with defaults on residential mortgages skyrocketing, FHFA’s director placed Fannie and Freddie into conservatorship, with FHFA acting as conservator. The stated goal was to ensure stability in the national housing market.

Over the next four years the GSEs received, under the terms of special bailout legislation, $189.5 billion in taxpayer money. In exchange, they issued special “senior preferred stock” to the Treasury under which they had an obligation to pay 10% interest on the bailout money they’d received. In early 2012, the GSEs began to make money again, together posting a healthy $8 billion in profits for the second quarter.

But in August 2012, a few days after posting that profit, Treasury and FHFA suddenly changed the terms of the GSEs’ special preferred stock. They replaced the 10% interest obligation with a requirement that the GSEs instead pay Treasury their entire profit each quarter in perpetuity (except for a small capital reserve that would gradually dwindle to nothing by 2018). The GSEs would, therefore, never emerge from conservatorship, and would, rather, be wound down and replaced with some other system of housing finance to be set up by Congress.

Government officials have claimed that they took this action because they feared the GSEs would start losing money again, and that taxpayers would end up on the hook again. In the months immediately following the momentous switch, however, the GSEs actually booked record profits. As of last November, by which time thousands of Fannie and Freddie investors—led by hedge fund Perry Capital and the Fairholme Group of mutual funds—had filed numerous suits in numerous courts, the GSEs had paid the government about $240 billion in exchange for the $189.5 billion bailout, or nearly $130 billion more than they would have paid under the original 10% coupon agreements.

Though the investor suits have been based on a wide range of legal theories, they fall into two main categories: those alleging that the momentous 2012 revision in bailout terms was beyond federal officials’ statutory powers and those alleging that it was an unconstitutional “taking” of shareholder property without just compensation—i.e., a violation of the Fifth Amendment.

Lawyers for the investor plaintiffs have speculated that the Treasury and FHFA officials responsible actually knew that the GSEs were healthy in 2012 (and possibly even in 2008) but confiscated their assets for opportunistic budgetary reasons, including, perhaps, the desire to postpone hitting the national debt ceiling at a time when Congress was threatening to shut down the government.

The two Miami suits against each GSE’s accounting firm were filed in state court, but were swiftly transferred to federal court by each defendant.

There, FHFA moved to oust the plaintiffs in each suit and to substitute itself, citing the federal law that created FHFA in July 2008. Under that statute, FHFA, when acting as a conservator, “succeeds to . . . all rights, titles, and privileges . . . of any stockholder” of a seized GSE. Thus, FHFA argues, only FHFA is empowered to bring shareholder litigation relating to Freddie Mac at this point, and it has not chosen to do so.

Before Judge Moreno could rule on that motion, the parties settled. Judge Moreno then dismissed FHFA’s substitution request as moot (i.e., no longer relevant). But last Monday FHFA asked once again to be permitted to oust the plaintiffs and undo the settlement. It would then dismiss the suit without seeking “payment of any kind.”

FHFA has also asked Judge Moreno to force the parties to show it the settlement deal by Friday.

The FHFA declined comment on the suit. Attorneys for the plaintiffs did not return an email seeking comment.

In the broader litigation, investors have had mixed results so far. In September 2014, U.S. District Judge Royce Lamberth of Washington, D.C., dismissed one group of consolidated investor suits, finding that FHFA and Treasury had acted within their statutory authority. His ruling was argued before a federal appeals court last April, and the appellate decision could come down any day.

In the Court of Federal Claims—where most of the constitutional “takings” cases are being heard—plaintiffs appear to be faring better, so far, with Judge Margaret Sweeney last month granting their request to force the Treasury Department, FHFA, and the White House to turn over documents which the latter had been seeking to withhold, citing various evidentiary privilege doctrines.