The Tories’ immigration headache is of David Cameron’s making