Judge also asks EU’s top court to weigh in on the legality of the overall programme