The nation’s top court overturned the measure in the third such incident since December.