The Trump administration appears to be putting together a new and improved version of its executive order banning people from seven majority-Muslim countries (and nearly all refugees) from entering the United States.

The original order, signed January 27, was in effect for only a week before being put on hold by a federal judge in Washington. Despite personal appeals (or, rather, Twitter threats) from Trump himself, the administration wasn’t able to get the Ninth Circuit to allow the ban to go back into effect — and its prospects don’t look terrific going forward, either. So at least some White House officials appear to be pivoting to plan B — rewriting the ban so that it won’t be as vulnerable to constitutional challenge.

Friday morning, NBC News learned that while the White House says it still believes the executive order will ultimately prevail in court, it’s also considering revising the order so that it would, erm, prevail better. And Philip Rucker of the Washington Post confirmed that a rewrite is on the table.

Confirmed that the White House is considering rewriting the travel ban executive order, per senior official. Trump will make the decision. — Philip Rucker (@PhilipRucker) February 10, 2017

The effort might help their cause. The chaotic and inconsistent implementation of the executive order during the week it was in effect likely shaped judges’ assessment of it, and taking more care with a second go-round — especially if it eliminates some of the most obvious weaknesses with the original executive order — could be a show of good faith.

But there’s no way the Trump administration could write a constitutionally watertight version of its refugee and visa ban. That’s because they themselves have put the idea out there that it’s just a dressed-up, constitutionally passable version of the “Muslim ban” Trump proposed during the campaign.

That doesn’t automatically render the executive order unconstitutional — in fact, there’s a decent chance that a maximally cautious version of a visa ban could, ultimately, be upheld. But it certainly makes it hard for any judge who does believe the ban had its origins in animus to put those worries aside.

The Trump administration would be in better shape if they limited the ban to new arrivals

Some of the problems the administration is facing in court probably could be fixed by rewriting the executive order to be more careful — which is to say, the issues could have been avoided had the executive order been drafted more carefully the first time.

The administration’s reported haste and carelessness in crafting the executive order has made it harder to convince judges there was a legitimate national security reason for it. The courts have asked the federal government to provide evidence, in public or in private, for why these particular countries were chosen for the blacklist — which is an extremely unusual move for the courts to make, and implies that they don’t trust there was a reason.

Indeed, actually going to the trouble of asking other agencies for input and review, which reportedly didn’t happen the first time, might lead to a different list of banned countries — or might supply some evidence that could be presented as a “rational basis” for banning the countries that are included in the blacklist.

The Ninth Circuit all but confirmed that it didn’t trust the administration’s drafting of the order. The court’s Thursday ruling rejected the “memo” that White House counsel Don McGahn sent last week exempting green card holders from the ban — and threw some shade at the “the Government’s shifting interpretations of the Executive Order” in the process.

In addition to simply demonstrating a certain level of good faith — and thus, perhaps, inspiring more deference — putting the order back together more carefully would allow the Trump administration to limit the scope of the order to make it harder to challenge in court.

For example: Different kinds of noncitizens have different levels of constitutional rights, but the courts have tended to agree that legal permanent residents have a good claim to due process rights, and that other immigrants and visa holders currently in the US have at least some right to due process. By making it risky for those people to leave and reenter the US, the Trump administration made the executive order easier to challenge.

If the executive order only applied to people who haven’t yet entered the US, though, it would be much harder for critics to challenge — because the US doesn’t have any obligation to let someone enter just because he has a visa, and the executive branch has nearly unchecked power to deny visas. (Similarly, if the executive order made it easier for a US-based employer or relative to apply for a waiver, it would make it harder for US-based entities to block the order on the grounds that Americans’ rights were being infringed.)

The Department of Justice has, in a way, already suggested revising the executive order along these lines. It asked the Ninth Circuit to limit the lower court’s hold on the executive order so that the hold only applied to people who had already entered the US — allowing the ban to go back into effect for new arrivals. The Ninth Circuit judges rejected that suggestion because they argued it wasn’t their job to rewrite the executive order to make it constitutional.

That’s correct. But the executive branch might take on that job.

They can’t unring the “Muslim ban” bell

So, sure, the executive branch could do some things to make the ban harder to challenge. But it’s not clear they could do enough.

The judiciary will all but certainly subject any ban to some level of scrutiny — they are unlikely to be so skeptical of the first version of a ban and then roll over when another version is put forth just because the second version took more time. That means the question of anti-Muslim animus might well be constitutionally relevant.

In order to foolproof the executive order against that claim, the White House would, well, have to go back and change the past. Because the things that critics will use to allege anti-Muslim animus came, in most cases, straight from Trump himself.

They could point to December 2015, when then-candidate Donald Trump called for a “complete and total shutdown of all Muslims” entering the country.

Or the general election campaign in 2016, when Republican nominee Donald Trump was explicit in saying that his proposal to ban immigration from certain countries “compromised by terrorism” was developed because people told him he couldn’t “say Muslim.”

Or the interview President Donald Trump gave to the Christian Broadcasting Network right before signing the ban, when he promised that the ban’s loophole for refugees who are “religious minorities” is a way to protect “Middle Eastern Christians.”

Or the Fox News interview Rudy Giuliani did the night after the executive order was signed, when he told the hosts that Donald Trump came to him and other advisers and asked him how a “Muslim ban” could be done “legally.”

It’s genuinely not clear, from a constitutional standpoint, whether statements like these doom the ban. The Ninth Circuit carefully avoided saying anything about this question in its Thursday ruling, and at least one of the three judges on the panel appeared skeptical that something said on the campaign trail could count as evidence of animus when the order itself is neutral on religion.

But it appears that at least some of the judges who’ve heard the case so far see the existing order as a sloppy attempt to phrase a “Muslim ban” in facially neutral language. It’s not clear what could get them to conclude that a second version wasn’t just a less sloppy attempt to do the same thing.

And for those judges who do believe these comments are evidence of Islamophobic animus, no amount of care and input in drafting a second version of a visa ban will eliminate the ban’s single greatest weakness: Donald Trump.