Prime Minister David Cameron wants to withhold “in-work” benefits only from migrants, but the move is discriminatory under European Union rules.