Court ruling further clouds Britain's EU exit