It should be obvious that the federal government has to follow its own rules, and that cost is a relevant factor when it comes to regulation. But this was apparently news to the Financial Stability Oversight Council (FSOC), a Dodd-Frank creation comprised of the heads of financial regulatory agencies and charged with overseeing the U.S. financial sector.

In a scathing opinion unsealed this week, District Court Judge Rosemary Collyer took the FSOC to task for failing to follow its own guidance and failing to consider the cost of its actions when it designated insurance giant MetLife as a systemically important financial institution (SIFI).

The FSOC has come under fire since its inception for its black-box and almost secretive decision-making process. In particular, companies have balked at the difficulty of challenging the SIFI designation once imposed, or of finding a clear pathway out from SIFI status. Some companies may appreciate being labeled SIFIs.

Despite protestations to the contrary, such designation substantially increases the likelihood that a company would be bailed out if it foundered — if the government has explicitly labeled a company as “systemically important,” it’s unlikely it will sit idly by while the company fails.

But the designation carries a host of new regulatory requirements that many other companies would dearly like to avoid. The FSOC has disdained challenges to its rulings, and some have argued that it deserves deference as the expert in the field. The court’s ruling introduces much-needed fresh air into the FSOC’s operations and highlights the vital importance of rule of law in administrative proceedings.

Judge Collyer’s ruling rests on two findings. First, that the FSOC failed to follow its own rules, ignoring guidance issued years earlier that summarized the analysis for determining SIFI status. And second, that cost is always relevant to a regulator’s decision-making, even if the underlying law includes no explicit instruction to consider cost. Both findings highlight key deficiencies in the FSOC’s decision-making process.

Although the FSOC has released no clear statement on where the line between SIFI and non-SIFI lies, it has released guidance describing a two-phase internal process it uses to identify companies that may qualify for SIFI designation. These phases include an evaluation of the size and interconnectedness of a company’s operations, and of its vulnerability to financial distress.

According to Judge Collyer, the FSOC completed only the first part of the analysis, essentially assuming that if a company was very large, its vulnerability didn’t matter. “Indeed,” she writes, “(The FSOC’s) Final Determination hardly adhered to any standard when it came to assessing MetLife’s threat to U.S. financial stability. … Every possible effect of MetLife’s [theoretical] insolvency was summarily deemed grave enough to damage the economy.”

As a member of the judiciary, it would be inappropriate for Judge Collyer to rule on whether the FSOC’s written guidance was the best way to determine SIFI status (especially since that question was not before the court). But to the extent that the FSOC has published such guidance, deviance from that guidance with no acknowledgment of such deviance, much less explanation for it, is an unlawful misuse of the FSOC’s power, as Judge Collyer rightly ruled.

The FSOC also ignored what the cost of SIFI designation might be for MetLife, arguing that Dodd-Frank doesn’t require such analysis. When interpreting statutes, lawyers typically argue that if a word is included in one part of the law but omitted in another, the omission should be seen as intentional. And this is what the FSOC’s lawyers argued: because other sections of Dodd-Frank include directions to consider cost when implementing regulation, the fact that the section on SIFI designation does not include such directions means that the FSOC was not required to consider cost.

But, Judge Collyer notes, “an agency may not entirely fail to consider an important aspect of the problem when deciding whether regulation is appropriate.” And cost is an important aspect of any problem. Remarkably, Judge Collyer did not even question MetLife’s assertion that, ironically, if the FSOC were to impose billions of dollars in cost by designating the company a SIFI, it could actually increase MetLife’s vulnerability.

The government is almost certain to appeal Judge Collyer’s decision. But whether her ruling stands or is overturned, her observations about the FSOC, and about the importance of the rule of law and the cost of regulation, reveal a troubling trend in post-Dodd-Frank regulation. While we all hope to avoid another Great Recession, doing so shouldn’t come at the expense of basic fairness, or basic economic principles.