IT was not the summer send-off Nicola Sturgeon had bargained on. Her wide-ranging reshuffle was supposed to round off the parliamentary year with a flourish.

It had been long planned. “Any government, after 10 years, needs to take stock and to refresh,” she told MSPs this week in 2017. But while the changes have indeed pepped up the government, with promotions for a new generation of talent from the 2016 intake, one bad - and wholly foreseeable - clanger left the overhaul overshadowed.

Instead of going back to their constituencies on a high note, MSPs left Holyrood with the name Gillian Martin ringing in their ears like the punchline to an off-colour joke.

To be fair, reshuffles often go awry. Tony Blair made a right hash of his in 2003, announcing the end of the 1,400-year-old office of Lord Chancellor, only to find out it couldn’t be done without an act of parliament. He also played fast and loose with devolution, making Alistair Darling a part-time Scottish Secretary by combining the role with Transport, and putting Scots MP John Reid in charge of the NHS in England. It was a mess.

Theresa May also botched her set piece reshuffle in January, as a series of ministers refused to budge, making the Prime Minister look, somehow, even weaker than before.

So Ms Martin’s on/off gig as further and higher education minister is not the disaster the First Minister’s critics want it to be. “These things happen,” as her spokesman sighed philosophically.

But that does not mean Ms Sturgeon’s reshuffle blues are a transient phenomenon. After all, this was supposed to be a very big deal.

There are now five new faces around a cabinet table of 12, nine new ministers in a set of 14. This is the team Ms Sturgeon hopes will win her the 2021 Holyrood election.

Indeed, it’s a sign of how sweeping the changes are that she has all but run out of promotion options. Of her 61MSPs, 36 are ministers, committee conveners, whips, or cabinet aides known as parliamentary liaison officers (PLOs). Two are off limits as deputy presiding officers, and nine are ex-ministers, who are less likely to serve. That leaves 14 MSPs - or 13 discounting Ms Martin - to fill seven vacant PLO posts and three committee chairs. The talent pool has become a puddle. There is no credible way back from this reshuffle. Yet the First Minister’s mistake was elementary.

Ms Martin’s undoing was a blog she wrote in 2007 as a college lecturer. It first gained attention when she stood for Holyrood in 2016 in Aberdeenshire. There were tabloid stories about her calling Alex Salmond a “smug git” and the Royal Family inbred “dysfunctionals”.

A joke that the EU had a “tranny trove” of cash for transgender issues was also criticised at the time. All this was in the public domain two years ago, and, we learned this week, Ms Sturgeon was fully aware of it.

Nevertheless, and despite that toxic “tranny” comment, she gave Ms Martin the job of widening access to further education. This proved to be downright reckless.

Given Ms Sturgeon’s familiarity with the press, she must have expected the blog to be exhumed, but she named Ms Martin a minister regardless. I assume she thought she could just ride out any fuss. But she failed to double-check what else was lurking on the internet.

Sure enough, the next day more material from the blog appeared in the media. It turned out Ms Martin had referred to “hairy knuckled lipstick-wearing transitional transgender Laydees”, opined on the tipping habits of “American Jews” and “American blacks” in diners, and joked about students in wheelchairs being PR gold.

Ms Sturgeon’s insouciance evaporated and she pulled Ms Martin from the list of ministers due to be confirmed by a vote of MSPs.

Even then, the First Minister kept digging. Despite it being obvious Holyrood would never approve Ms Martin’s appointment, she initially kept the door open. Rather than calling the whole thing off , she said she would “reflect further” on the “ill-advised” remarks, and insisted Ms Martin was actually a swell sort. She canned her three hours later.

The defensive attitude only added to the attacks on Ms Sturgeon’s judgment. She said she took these “on the chin”. But she never sounded like a genuine penitent.

The criticism about bad judgment is key. This is a lethal narrative if it takes hold. On judgment, leaders have nowhere to turn, no one to blame. It is all about them.

It is also a narrative that can absorb almost any event. Whenever something goes wrong for the government this summer, watch the opposition parties try to make it about Ms Sturgeon’s judgment.

It’s more than sport for her enemies. For them, this summer is not about a reshuffle or a blog, it is about the build-up to Ms Sturgeon’s next giant decision in government: whether or not to press for a second independence referendum.

If she does, Unionists will claim it is her wildest misjudgment yet.

In itself, this week’s bourach clearly doesn’t scupper a new vote. But it does play into a drip-drip critique about the First Minister’s judgment being off kilter, with independence the prime example.

Her unforced error has advanced that line of attack. She must now be praying for a thoroughly dull recess.