After nine years living in Egypt I would say that Egyptians have no problem with actual foreigners, but huge ones with imaginary ones.
During the 18 days of the revolution, the demonstrators were foreign agents and foreign infiltrators. State TV ran interviews with hopped-up teenagers swearing they heard people in Tahrir speaking Arabic "but their accent was not Egyptian!!"
"We get your message," the presenter would say, nodding gravely. My zabbal* told me matter-of-factly: "Those boys and girls are all trained by Israelis. Everybody says so." Meanwhile, almost every foreign journalist I know was beaten or barely escaped a beating, by a real or a stage-managed mob. Mubarak said he wouldn't step down because of "foreign dictates."