The Supreme Court on Wednesday will — finally — consider the legality of President Donald Trump’s controversial "Muslim ban" executive order from his first week in office. Needless to say, pundits from across the political spectrum are portraying the case, Trump v. Hawaii, as a referendum on all-things Trump: from the legal significance of his tweets and campaign statements to the debate over whether his executive orders should be treated as seriously as those issued by his predecessors. Some have even suggested that the case is an opportunity for the Supreme Court to atone for some of its prior mistakes, most notably its blessing of the Japanese-American internment camps during World War II.

But whether the justices ultimately side with the president or the challengers in Trump v. Hawaii, the true winners in this litigation are the federal courts — which have been instrumental in pushing the executive branch to more properly tailor what Trump calls the “travel ban” in the first place. In the midst of the increasingly ubiquitous political insanity of the past 15 months, the judiciary seems to be the one institution that has remained largely immune.

The true winners in this litigation are the federal courts — which have been instrumental in pushing the executive branch to more properly tailor the “travel ban.”

In many ways, litigation arising out of the travel ban has been the biggest test case for the courts in the Trump age. It started with a chaotic series of trial-court rulings in response to the first iteration of the ban, which was not well drafted, vetted, or implemented (recall the chaos at various international airports). By February 3, 2017, a “so-called” federal judge in Seattle had put the ban on hold over grave concerns that it was unlawful (in exceeding the president’s statutory authority) and unconstitutional (in violating the due process rights of non-citizens lawfully present within the United States).

The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned! — Donald J. Trump (@realDonaldTrump) February 4, 2017

Although the government initially asked the court of appeals to reconsider the decision, it declined to pursue that appeal and ended up abandoning the original ban in favor of a somewhat more-nuanced version issued on March 6, 2017. (Trump would later describe it as a “watered-down, politically correct version” that was “tailor[ed]” at the behest of “the lawyers.”)

Get the think newsletter. This site is protected by recaptcha

This second iteration fared only a little better in the courts. It was quickly enjoined by federal judges in Maryland and Hawaii, with those injunctions upheld by the Fourth and Ninth Circuit Courts of Appeals. And when the case first reached the Supreme Court last June, six of the nine justices voted to leave those injunctions in place for anyone with a “bona fide relationship with the United States” while the Court considered the ban on the merits.

Once again, rather than push the justices into what was likely to be an adverse ruling on the merits, the government went back to the drawing board. And on Sept. 27, 2017, Trump issued his third iteration of the travel ban (the one the justices are now considering), which led the Court to dismiss the government’s appeal of version two on the ground that it was moot. The third version adds still more nuance, nominally includes at least two countries that aren’t Muslim-majority, and creates a series of case-specific exceptions ostensibly to address concerns of overreach.

There are still powerful statutory, constitutional and moral arguments against even this third version of the travel ban (David Cole, the ACLU’s legal director, offers a concise summary). But, unlike the first two versions, the ban is now plausibly — if superficially — defensible. To put the matter simply, it’s going to be close — and will almost certainly come down to the votes of the three justices closest to the Court’s center, Chief Justice John Roberts, Justice Anthony Kennedy and Justice Stephen Breyer.

All of this has led a number of conservative commentators to predict not only that the justices will in fact side with Trump, but that such a ruling will both vindicate him and seriously rebuke the lower federal courts. These partisan courts, the pundits argue, have effectively “joined the resistance,” and the justices will set them straight. The Trump administration has also made noises to this effect, with Assistant Attorney General Beth Williams arguing in a speech to the American Bar Association in March that the courts have been adopting novel legal theories and strategies to freeze the president’s policies—rulings that should cause “alarm."

All of this has led a number of conservative commentators to predict not only that the justices will side with Trump, but that such a ruling will rebuke the lower federal courts.

Among the many problems with these arguments is the fact that they fail to account for two different— but equally important — contrary bodies of evidence. First, with respect to the travel ban itself, the only reason why there’s even a chance that the government will prevail now is because of the lessons it took away from its earlier losses in the courts. That is to say, if the third version of the travel ban is legal, it is largely, if not entirely, because earlier judicial rulings forced it to be. Judges did their job, and the government, as is its right, reacted. That’s not federal courts running amok; it’s federal courts being federal courts.

Second, while all of this is going on, lower federal courts are continuing to rule against Trump’s other immigration policies without anywhere near the same fanfare or controversy. Last Thursday, for example, the Chicago-based federal appeals court sustained a nationwide injunction against a pair of funding restrictions that Attorney General Jeff Sessions had imposed against so-called “sanctuary cities,” concluding that Sessions had no authority to tie such funding to the specifics of state or local immigration policies. As Judge Ilana Rovner (appointed to two different judgeships by President Ronald Reagan and President George H.W. Bush, respectively) wrote for the court:

Our role in this case is not to assess the optimal immigration policies for our country; that is not before us today. Rather, the issue before us strikes at one of the bedrock principles of our nation, the protection of which transcends political party affiliation and rests at the heart of our system of government—the separation of powers.

Like the Chicago ruling, the work of the federal courts during the Trump presidency to date has consistently shown fidelity to longstanding principles concerning the role of the judicial system—a role that has been put to the test by many of the novel policies expounded (often in novel ways) by the Trump administration.

That the Supreme Court is only hearing a case about the travel ban now, with the ban in its third iteration, is not proof that the federal courts have joined the resistance; it’s proof that they’ve been the one governmental institution that continues to serve the American people in the way the Founding Fathers intended.

Steve Vladeck (@steve_vladeck) is a professor of law at the University of Texas School of Law whose teaching and research focus on federal jurisdiction, constitutional law, and national security law. Steve is co-editor-in-chief of the Just Security blog (@just_security) and co-host of the National Security Law Podcast (@nslpodcast).