Court allows Brazil’s Temer to stay in office