Anybody who gets killed by an ideologically-based group or person could have avoided it, yet they didn't.
In the case of the Evil Lair Security Guards, they either signed up to protect it knowing what happened there, or they didn't take the time to research their prospective employer. If you're going to be the muscle that stops intruders, you'd better have some idea of what you're protecting. Either way, they're just human shields that the senior commanders thew up to protect themselves.
In the case of the Young Conscript Soldier, there is still a choice. If you don't like the political climate in your country and war is brewing, leave. Even if the country doesn't allow you to leave, try to make it. You'll either be jailed, in which case you don't end up fighting, or you'll be killed on the spot, in which case you didn't contribute to the cause you attempted to flee. Or defect after conscription. Give whatever intelligence you can to the other side. As much as I hope there is a special spot in hell for traitors, deserters, and mutineers, it's not my beliefs that should stay your feet. And, once again, they're the human shields for the senior commanders.
Even the Innocent Bystander could have avoided such an death. This is the only group that garners any sympathy from me, because it is often difficult and painful to leave your life behind to escape to a less ideologically-targeted area. But it is still possible to avoid it by leaving. The victims of terrorist attacks and other such acts of destruction are tragic losses to their affiliated country, family, company, friends, and really anyone attached to them. It's nearly impossible to place any kind of significant blame on these people. But if, say, an Iranian citizen is killed in a raid on their uranium centrifuges or breeder reactors, I won't lose sleep. Don't be so close to such a hot target.
TL;DR: One can avoid becoming 'collateral damage' by removing one's self from the situation entirely.