If the EU gets its way we will be jumping from the control of one court to another on leaving the union.

It is one of the slyest ironies of Brexit so far that the very person who has successfully benefited from the protection of the Court of Justice of the European Union (CJEU) against the excesses of the unfair actions of the UK government, and in particular of the prime minister in her former capacity as home secretary, has been… the secretary of state for exiting the European Union himself.

Step forward Mr David Davis, who was obliged to remove his name from the case he and Tom Watson brought against excessive data retention powers in the Data Retention and Investigatory Powers Act 2014 (DRIPA) when he joined the Cabinet in July. This means that, although the court’s judgement cites Davis and Others (C‑698/15) in the text of its judgement, the name of Davis has mysteriously disappeared as a claimant by the time the full judgment appears. Where is Davis? In this way, we lighten the beginning of a sombre and anxious new year.

The Law Society, to its credit, was an intervening party before the CJEU, to protect legal professional privilege in mass surveillance by government authorities. Disappointingly, the court dealt with the point only glancingly, and did not give a clear statement about the importance of protecting privilege. I assume that is because it was not necessary to do so – DRIPA failed one or more prior conditions for data retention, described collectively by the court as: restricting itself solely to fighting serious crime; allowing access only after prior review by a court or independent administrative authority; and ensuring retention of the data within the European Union.

It appears that withdrawal from the jurisdiction of the CJEU is one of the absolute conditions this government is setting as its definition of Brexit. Having examined for six months the ‘Rorschach’ blot which was the Brexit vote, the government is beginning to see its meaning at last.

The prime minister has repeated her incantatory spell of ‘Brexit means Brexit’ over the blot for months - for much longer than it took for us all to be driven mad by it - and convinced herself that the quiet popular revolutionaries of Brexit actually meant the following four things when they took time off from their everyday lives to go to their local school or church hall to cast their vote: take back control of immigration by withdrawing from free movement provisions, and so withdrawing also from the single market; cut the amount being paid into the EU; free Britain to strike new trade deals, so withdrawing from at least part of the customs union; and of course leave the jurisdiction of that pesky CJEU.

The foreign secretary has opened the attack against the court by writing an article on new year’s day mocking one of its decisions from 2014 – Vnuk (Case C‑162/13).

Yet the pesky CJEU may yet determine the UK’s procedure for Brexit, if a new case being brought in the Irish courts is referred to it. The new case’s crowdfunding target has been met, and it will seek to determine whether article 50 is revocable and whether article 50 triggers withdrawal from the EU alone, or also from the European Economic Area. The UK courts have so far avoided referring article 50 questions to the CJEU, but we may yet have that court dictating the procedure and meaning of article 50 to the UK government.

But there is another twist on the horizon. It looks as if, in the governance of our trading relations with the EU on our departure, we will be jumping from the control of one court to another. The new court will be the Multilateral Investment Court, at least if the EU gets its way. It has been in favour of an investment court in trade deals for some time now.

Both the recent EU-Canada Comprehensive Economic Trade Agreement (CETA) - a possible model for Brexit - and the EU-Vietnam Free Trade Agreement include a bilateral investment court system to decide disputes, and foresee a transition to a permanent multilateral court mechanism in the future. Similar provisions will be included in all its negotiations involving investment from now on.

It is not too late to give your views on this court, because the European Commission is currently consulting on it, with a deadline of 15 March 2017. (Arbitrators will be particularly hard hit by a general move to such a court, since it will mean an end to - or serious diminution of - a lucrative practice in investment arbitration. Yet, as I have indicated before, it is allegations about their behaviour which have partly led to this state of affairs.)

It seems that, struggle as we might, we will not escape - horrors! - non-UK judges deciding our future relations with the EU.

Jonathan Goldsmith is a consultant and former secretary-general at the Council of Bars and Law Societies of Europe, which represents around a million European lawyers through its member bars and law societies. He blogs weekly for the Gazette on European affairs