Indeed. Imagine if, say a large UK company had a policy which said that it would only employ citizens of EU nations. Or better still, imagine that after Brexit that same company announced that it has in its rules a stipulation that staff from countries in what remains of the EU would be required to resign their posts. It would face a discrimination case in the courts and would lose. But here we have the EU saying that nobody with citizenship outside the EU can work for them. The issue also shows the utter stupidity of an organisation that would see the loss of its staff based simply on nationality.
Instead of trying to find ways to circumvent their stupidity, Mr Juncker would be better off trying to find out why such a ridiculous rule exists. But since he heads an organisation that seems to excel in stupidity it probably comes as no surprise.