The departments of education and infrastructure development dithered for two decades over a school they ‘erroneously’ sold