The recent Holyrood election was something of an inconvenience for the SNP.