The Scottish government’s legal advice from 2018, belatedly released on Tuesday under threat of a no-confidence vote in the Deputy First Minister, finally proved that First Minister Nicola Sturgeon and other officials knew their bid to pin sexual misconduct claims on former leader Alex Salmond were doomed to be thrown out by a judge.