It's no coincidence that it's the same branch of Islam inspiring all this evil and generalising it to 'religion' is a cop out. I'm really not sure what can be done to guard society from it other than to have a presumption that people of this branch shouldn't be let into the country because of their extreme beliefs and the potential for that to become extreme action, and maybe stop financing the teaching of it in British schools. Obviously, it'd have to be done in a tactful way but without doing it, you leave yourself open to many more attacks like this because the reality is - as the security services have admitted, they are extremely devastating and extremely difficult to stop.