Building flats on ‘shaky’ law