John Swinney had referred to Andy Burnham as the "last prime minister".