The EU (Withdrawal Agreement) Bill, which passed the House of Commons last week, ought not to be controversial. It only implements, in UK law, a Brexit deal which parliament backs in principle, and for which the government has just secured a mandate in a general election.

Yet the detail of the bill still matters. A good EU(WA)B would leave behind a statute book that made sense, with clear provisions on how different types of law interact with one another: laws passed pre- and post-Brexit, by the EU institutions and by our own, in the deal and outside it. A bad bill, by contrast, would leave uncertainty and confusion in its wake, generating too much expensive work for lawyers as they try to advise confused citizens on their rights and duties, thrusting them towards the courts to hash it out, and deterring businesses from making decisions in the meantime.

Before the election, the government published a largely sensible version of the bill. Since the election, however, the bill has got worse. Among the government’s dodgy additions are a new Clause 26, which throws doubt on the status of judgments of the European Court of Justice.

The position now, under laws already passed by parliament in 2018, is that all UK courts except the Supreme Court will be bound by pre-Brexit decisions of the ECJ. The Supreme Court will be able to depart from pre-Brexit ECJ decisions in the same circumstances it would depart from its own previous decisions—“when it appears right to do so,” but in practice, very rarely.

The first version of the government’s bill did not touch this regime, but the post-election version fiddles with it. The new bill would empower ministers to instruct lower courts, before the end of the transition period, to depart from ECJ case law too—and to specify the circumstances in which they should so depart.

The new clause is bad for legal certainty in so many ways. Will ministers use that power at all, or let it lapse at the end of the transition? If they do use it, which courts will ministers tell to ditch ECJ case law? Will those courts have a mere power to depart from ECJ case law, or a duty to do so? In what circumstances? Will there be different instructions for different courts, or for different types of cases? A new wave of uncertainty would wash over the legal system after transition, as cases worked their way through the courts and judges tried to make sense of unfamiliar new legal tests. “What businesses want is certainty,” said Boris Johnson during the election campaign. Pity them now.

Just as worrying are the implications for the rule of law. This government claims to be keen on the separation of powers, concerned that judges stray too often into political territory. But the separation of powers goes both ways. In a society governed by the rule of law, ministers and their officials do not get to decide what laws they must obey, handing down instructions to the judges at a time of their choosing. That is a job to be conducted in the clear light of day by parliament, which already decided on the status of ECJ judgments when it passed the EU (Withdrawal) Act 2018.

If the government wants parliament to think again, it should put any changes in the text of the bill itself and persuade parliament to endorse its new policy, not hand ministers the power to make the changes at a later date—though it would have a hard time making the case that any change, and the uncertainty it would bring, is now justified.

It is no surprise that the House of Commons has already waved through the bill untouched: the government has a stonking majority. Leading barristers in the House of Lords, however, have put down an amendment to remove this strange power. Peers ought to support it. To do so would be no sleight to Brexit itself, nor Johnson’s Brexit deal, nor the mandate the government secured in the recent election. It would leave all that untouched, while averting an attack on legal certainty and the rule of law.

At the same time, the Lords need to proceed with caution. Those at the top of this administration are no fans of checks on their power. Some cynics suspect that they have put in this clause precisely because they know the Lords will not wear it, in the hope of engineering an early bunfight with the upper house. That would allow the prime minister to brand the Lords the enemies of Brexit, and prepare the ground to limit the second chamber’s powers later in the parliament—bolstering the constitutional dominance of an already mighty executive. Hopefully, the amendment will get enough support for the government to offer a sensible compromise. If it does, peers ought to bite: there are now constitutional risks every way they look.