The people I am most in favour of helping are those that are fleeing medieval mindsets. These people are hardly likely to turn into the very people they need to get away from in the first place.
I think you are right to talk about mindsets however. You are rightly concerned about people getting blown up in the UK, but individuals don't do this because of the colour of their skin, they do it because of the ideas in their heads.
Stopping immigration will not stop terrorism. Increasingly people will become radicalised over the internet. Al Quada has been quietly regrouping in the background and we know they have the capabilities to fly planes into buildings.
If we want to stop people killing us because of faith we have to do something about faith. Bad ideas are the problem here. Basing decicisions and actions on faith is not a good way forward and it is very difficult to argue against the validity of one perfect heavenly father when we still cling to one of our own. Christianity is evidently much less troubling than Islam, largely because it is ignoring many of God's commands, but it still promotes the idea that it is reasonable to base ones existence around supposedly divine origin ancient scriptures. I do not believe this is reasonable. I believe it is harmful and the cause of many of our problems.
As a side note. You only seem to focus on the deaths inflicted upon us by immigrants. As stated above, this is a devastating issue which needs to be solved by talking about the right things, but the number of deaths attributed to immigrants pales into almost insignificance when you consider the number of British lives that have been saved through the action of immigrants.
Immigration and terrorism are very complicated problems. There are no simple solutions, however much you want there to be.