Shares of Fannie Mae and Freddie Mac rose on Friday after a federal court unsealed an opinion that allowed some of the legal claims brought by investors to proceed.

Judge Margaret Sweeney of the Court of Federal Claims dismissed many of the claims brought by shareholders in the two companies who claim that the government’s sweep of their profits violates the law and amounts to an unconstitutional taking without compensation, holding the law barred the court from adjudicating any alleged injuries to the shareholders. Like so many other federal courts who have considered the question, Sweeney held that the Claims Court lacked jurisdiction to rule on allegations that shareholders were harmed by 2012 changes to the terms of the government’s support for Fannie and Freddie.

Sweeney, however, did not toss out the claims based on the idea that the companies themselves were harmed by government action. These so-called derivative claims will be allowed to proceed to trial.

The market greeted this legal victory with cautious optimism. Share prices of Fannie rose by around 6.5 percent to $3.46 on Friday, with shares of Freddie up around 5.7 percent to $3.15. To put that in context, shares of both companies were trading higher–$3.60 for Fannie and $3.44 for Freddie–in September following a favorable legal decision from the Fifth Circuit Court of Appeals.

Investors have good reason to be wary. Judge Sweeney’s court can only hear cases against the U.S. government involving claims for money. That means she lacks the authority to bar the government from collecting all of their profits as a dividend for the government’s nearly $190 billion investment in the companies. At most, she can require the government to compensate the companies for any harm they have suffered due to the net worth sweep.

Proving any harm to the companies may be difficult. The government is sure to argue that its support for Fannie and Freddie has helped the companies rather than harmed them. Under the original terms of their bailout, Fannie and Freddie promised to pay an annual dividend equal to 10 percent of the rescue funds they received from the U.S. Treasury plus an annual commitment fee on the remaining amount Treasury had pledged to support them. When profits fell short of the amount necessary to pay the dividend, the companies drew additional amounts from the Treasury. The commitment fee was never paid and its amount was never set as Treasury waived it each year in light of the financial difficulties of the companies.

The deal was changed in 2012 by an agreement between Treasury and the Federal Housing Finance Agency, which was acting on behalf of the companies as their conservator. Under the new deal, the commitment fee has been permanently suspended and the government agreed to collect nothing in years when the companies lost money, leading at least one GOP lawmaker to argue the deal amount to a second bailout. In exchange, the companies agreed to pay all of their profits to the Treasury in good years.

When the companies returned to profitability, writing up tax-losses that had been written-off during the financial crisis, their payments to the government soared much higher than would have been required under the 10 percent dividend. Later, as profitability leveled off, the annual dividend sank below the 10 percent figure. Last year, for example, Fannie Mae paid $9.4 billion in dividends to Treasury, 7.8 percent of the $119.8 billion of aid it has received.

Another reason for caution is that Sweeney’s decision to let the derivative claims proceed rests on a very thin legal reed. Most courts have held that the FHFA’s actions as a conservator do not amount to state action because the agency is essentially stepping into the shoes of the private companies. Sweeney, following a decision in a federal trial court in Rhode Island, went the other way and said the FHFA counts as an arm of the government when it acts as conservator. That’s crucial because the Court of Federal Claims can only hear cases against the government.

Decades of legal precedents have held that the decisions of government agencies such as the Federal Deposit Insurance Corp. that take over failed financial institutions do not count as state action. Sweeney’s opinion, like that of the federal district court in Rhode Island, holds that the FHFA’s role is different from those earlier cases because it is the conservator of Fannie and Freddie rather than their receiver, the role the FDIC typically played.

Both decisions rely on an argument made in a student-written law review article published in the 2017 Michigan State University Journal of Business & Securities Law. It claims that prior decisions from the federal courts errantly overlooked the distinction between receivership and conservatorship. The decisions of the FHFA should be treated as state action because the conservatorships should be considered permanent, more akin to the government’s control of Amtrak than the FDIC temporarily managing a failed bank, the article claimed. A company permanently controlled by the government essentially becomes a part of the government for legal purposes, according to Supreme Court precedent.

That’s likely to leave many investors scratching their heads because it is obvious that the conservatorships are not permanent. The FHFA has already declared that it plans to end the conservatorships and return the companies to private control. That may prove far more difficult than FHFA director Mark Calabria expects but the pursuit of privatization demonstrates that this is not anything like Amtrak.

What’s more, there is nothing in the 2008 statute that enabled the FHFA to act as a conservator that supports treating conservatorship as state action or permanent. The statute does not explicitly describe the conditions for the companies to exit conservatorship but it treats conservatorship as a temporary status and states that conservatorship ends when the companies are brought into receivership.

The government’s lawyers will undoubtedly appeal the Rhode Island ruling when a final decision is made in that case, arguing that the court was wrong in declaring the FHFA conservator decisions amounted to state action. Likewise, Sweeney’s case will remain under threat of being overturned by a higher court because it rests on this new and untested legal theory from a student law review article. Perhaps the federal courts will adopt the theory–but that is far from a certainty. Even cautious optimism may be too strong a forecast for such an unpredictable outcome.

Investors certainly should not take comfort in the misplaced hope that the government lacks the appetite to continue defending the profit sweep. After years of winning Fannie and Freddie investor lawsuits in federal courts, it will take more than a couple of setbacks to force the government to rethink its position. And the Trump administration will not be eager in an election year to reach a settlement that would potentially deliver a huge windfall to a handful of hedge fund manager billionaires.

Fannie and Freddie shareholders have achieved a rare victory just by having some of their claims survive dismissal. That’s should be greet4ed with relief but not exuberance.

The case is Fairholme Funds, Inc v. United States, 13-456C.