Spanish court strikes down order to confine Madrid