Ministers lose half a million pounds over sale of flats with