A trio of courts once again handed Donald Trump’s immigration order legal setbacks on Wednesday and Thursday. In Hawaii, federal Judge Derrick Watson issued a temporary restraining order against the law. The Ninth Circuit Court of Appeals announced Thursday night that it would not hold an en banc hearing, meaning one with all judges on the court seated, to reconsider its earlier ruling against the law. And Thursday morning, a federal judge in Maryland temporarily blocked the portion of the order that bars immigration from six predominantly Muslim countries.

But this wasn’t quite a replay of the resounding defeat that Trump received after round 1 of the battle. The first executive order that emerged from the White House was almost universally acknowledged to be sloppy, careless, and not up to legal standard, and it came as a little surprise when courts rejected it. So the White House went back to the drawing board, redrafting the order in a way that was designed to pass muster in court.

What is unusual about the rulings in Hawaii and Maryland is how heavily they rely on statements made outside of court, and in particular on statements made by senior Trump aide Stephen Miller during press interviews. In the legal arena, the Trump administration presented itself as withdrawing its first order and issuing a second one, relying on different constitutional bases. But publicly, Trump aides were insisting that the new order achieved the same thing as the first one.

In a February 16 interview, Miller said that the difference between the two orders was “mostly minor technical differences,” but the “basic policies are still going to be in effect.”

“Fundamentally, you’re still going to have the same basic policy outcome for the country, but you’re going to be responsive to a lot of very technical issues that were brought up by the court and those will be addressed,” Miller told Fox News on February 21. “But in terms of protecting the country, those basic policies are still going to be in effect.”

The plaintiffs argued that these statements proved that whatever the government was saying in court, the Trump administration was still envisioning the policy as a “Muslim ban,” just like the one that courts had already struck down. As a result, they argued, judges should also rule against the second order. The government contented that finding against the government would require the impossible act of what is going on inside the president’s mind, in Trump’s “veiled psyche.”

Judge Watson rejected that. “For instance, there is nothing “veiled” about this press release: ‘Donald J. Trump is calling for a total and complete shutdown of Muslims entering the United States,’” he wrote.

But that’s a disputed point of law. Josh Blackman, a professor at South Texas College of Law, argued on Twitter that the Judge Watson’s reasoning was overly broad, and would seem to prevent any administration from ever issuing an immigration ruling pertaining to predominantly Muslim countries. On Lawfare, which has been critical of the Trump White House, Peter Margulies also argued that Watson’s reasoning constituted judicial overreach. And in the Ninth Circuit, Judge Jay Bybee laid out a case for upholding the original executive order, even as he scolded the White House for its attacks on the judiciary.

Presented with a situation in which some legal scholars were assailing the courts for overreaching, and taking his side, what did the president do at a rally in Nashville Wednesday night? He shot himself in the foot.

Faced with a ruling in Hawaii that alleged that Trump was being disingenuous when he argued that his second executive order wasn’t really a Muslim ban, Trump went out of his way to convince the courts, and anyone else listening, that the judges were right: The new order really was the same as the first one.

“The order he blocked was a watered-down version of the first order, that was also blocked by another judge and should have never been blocked to start with,” Trump said. “Remember this: I wasn’t thrilled, but the lawyers all said let’s tailor it. This is a watered-down version of the first one. This is a watered-down version. I think we ought to go back to the first version and go all the way, which is what I wanted to do in the first place.”

Why would Trump go out of his way to prove that the judges were right? As usual, the question becomes whether Trump is crazy, or crazy like a fox.

Perhaps the president just couldn’t help himself, got excited about being back out in a campaign-style rally, and spoke rashly. It also seems likely that he hadn’t read the entirety of the order when he hit the stage in Music City. Trump repeatedly railed against the Ninth Circuit, even though the ruling he was discussing was the district court order in Hawaii. (Press Secretary Sean Spicer, whom both the Maryland and Hawaii judges cited in their rulings, told the press pool on Air Force One after the rally that he had not read the order yet.)

The alternative, Machiavellian explanation is that Trump isn’t really all that worried about the policy outcomes. Legal matters aside, the travel ban looks more like a piece of symbolism than a matter of sound policy; when White House officials asked the departments of Homeland Security and Justice to provide a factual basis for the ban, they were upset to receive a report suggesting the ban would actually do little to make the country more safe. And the White House delayed rolling out the second, revised order for public-relations reasons, a move that clashes with protestations of urgent danger and suggests either cynicism or recklessness. In this scenario, it is more politically useful for Trump to be able to rail against courts for having prevented him from keeping the country safe that it is to actually have the executive order in place.

Whether or not the Machiavellian interpretation is valid, Trump’s outburst on Wednesday risked undercutting the administration’s standing in court. If that is true, he will be forced to try to squeeze whatever political benefit he can get out a situation where the White House has bobbled its legal approach.