Around 50,000 people may be left homeless if the Supreme Court rules against them.