Federal health order allowing rapid removal of migrants must end Wednesday, court rules