Since the invasion of Iraq in 2003, I have been quite vocal in my opposition to most of what is done by the U.S. military in the name of defending our freedoms and other nonsense. Because of this I have been accused over the years of not appreciating and not supporting the troops (I plead guilty) and indifference to and wishing harm to the troops (I plead not guilty).
However, on this latter point it needs to be said that it is only natural to expect that foreigners on the receiving end of U.S. military invasions, occupations, bombings, and killings would retaliate against U.S. troops. Just think of what Americans would do if these things were done to them.
So, on the one hand, as Herbert Spencer wrote over a hundred years ago in his essay on patriotism: "When men hire themselves out to shoot other men to order, asking nothing about the justice of their cause, I don’t care if they are shot themselves." But on the other hand, as an American, I don’t want to see any American soldiers harmed, and especially those that were duped into fighting some unnecessary and senseless foreign war.
The solution to the dilemma is to not send American soldiers overseas to fight foreign wars, which are inherently unjust. This keeps foreigners from having to shoot invading American soldiers and American soldiers from having to shoot resisting foreigners.