Humza Yousaf MSP is a rising star in the SNP firmament, or rather he was once a rising star and future leader. Probably not any more. His handling as Transport Minister of the problems on Scotland’s railways has been judged deficient by furious commuters in recent weeks. Yousaf’s career has been derailed. Over-confidence has been replaced by talk of learning lessons and the unveiling of an emergency plan to fix the railways.

In 2014 the SNP government gave the contract to run the railways to Abellio, a Dutch firm, rather than the other option, National Express, a group headquartered in England. The hint of suspicion – denied – lingers that the Scottish government did not want Scotland’s railways run by an English company. Passengers have paid the price for a poor decision, whatever the motives involved were.

Yousaf inherited a mess of delays and customer complaints and has struggled, badly. There is a certain justice in this, in seeing a performer with the gift of the gab who was always so cocksure when explaining on television how things should be discover for himself that government is hard. But that’s harsh. It is easy to criticise. As Euan McColm put it in The Scotsman earlier this week: “Transport minister is a stinker of a job. The incumbent is at the mercy of the elements each winter, and careless handling of a transport crisis can be deeply damaging to his career prospects. Back in 2010, the then holder of the position, Stewart Stevenson, resigned after describing the response to drivers being trapped on snow-covered motorways for more than ten hours as “first-class”. Yousaf now finds himself under the sort of pressure that Stevenson couldn’t bear.”

Why does any of this matter? Who cares if the Scottish Transport Minister’s career is heading for the buffers? If you live in Scotland – and need a reliable train service to get to and from your work – it obviously matters. Beyond that the row serves as a timely and useful reminder for those outside Scotland that not all is quite as the dominant SNP says it is. Underneath all the pontificating, the SNP is getting found out on transport, education and now the NHS, which it has run badly for almost a decade.

A report published by Audit Scotland last month on the unreformed NHS north of the border, which has always been a service separate from that in England, was damning in its findings. The NHS budget has increased by 5% above inflation since 2009, but in the same period patients waiting for an inpatient appointment increased by 5.6 per cent and for an outpatient appointment by 89 per cent. Spending on drugs is rising sharply and health boards are in trouble. One particularly duff piece of virtue-signalling in particular illustrates the failure. The decision to scrap prescription charges in Scotland has seen the amount of paracetamol, ibuprofen and antihistamines dispensed by the state increase by two thirds in ten years. In an era when a pack of own-brand basic paracetamol costs less than 30p on the high street, the Scottish Government is giving the stuff away.

Listen to the SNP leadership and you will hear none of this. The pompous talk is of shuttle diplomacy to Brussels, great constitutional wrangles with London over Brexit and another referendum on Scottish independence. Scotland’s First Minister, Nicola Sturgeon, has turned the vague speech on Brexit, stressing unhappiness, in a nice way, into an art form since the referendum on June 23rd. Earlier this week she gave a polished address to a business audience in London, lamenting the UK government’s approach to leaving the EU. But that speech is losing its power with repetition. It becomes ever more apparent that if the UK government is hardly handling Brexit brilliantly, then the SNP is also getting itself (as yet largely unnoticed outside Scotland) into a terrible tangle on the topic.

The daft proposal from the Nationalists – to the extent that one can work out what it is – seems to be that Scotland will remain in the Single Market, even if the UK leaves, which creates obvious problems in terms of migration, free movement and borders. Today, at a meeting of the British-Irish Council, Sturgeon reiterated, yet again, that she is examining all the options. There aren’t any, or not really.

The key weak spot is exports and the reality that Scotland is in a highly successful single market already that is much more important to its economy than the EU. That market is called the UK. The Scottish government’s own figures show that 64% of exports – more than £48bn – go to the rest of the UK. The EU is the smallest of Scotland’s export markets, behind the rest of the world. One SNP MP got into a mess this week in trying to claim that because England is still in the EU – for now – then the EU is Scotland’s biggest export market. Er… no.

So, if the SNP is in trouble, why do I say in the headline at the top of this piece that Brexit necessitates a rethink of the UK? The reason is that in Whitehall and in Edinburgh there is a realisation that Brexit means the return of a lot of powers. Ministers are starting to ponder the implications. What will go back from Brussels to the UK government and Westminster and what to Scotland, Wales and Northern Ireland? The answers are as yet unclear.

The SNP is already struggling to cope with the additional powers the Scottish Parliament has been given since the separatists lost the 2014 independence referendum. The administration of newly devolved welfare benefits will have to continue to be run by the UK, because it is hard and the SNP has failed to get ready in time.

It is in that context that Brexit will eventually deliver an avalanche of powers cascading back from Brussels, on all manner of questions, from agriculture and fisheries, to state aid and regulation, to competition policy and consumer law. It will reopen the devolution settlement and require a redesign to work out what sits where.

When that happens, Unionists and the UK government should not get rolled by a demanding SNP which will no doubt turn the negotiations into the latest chapter in a long chronicle of grievance-hunting. What will be needed is a fair but hard-headed agreement to build a settlement that can endure. It is a chance to determine what a post-Brexit UK looks like.