The legal system already deals with these sorts of situations. It is illegal for a police officer to use force against an individual absent certain circumstances. Because we don’t want to paralyze the police with constant second-guessing, however, we give them qualified immunity. By this, officers are immune from civil suit if, at the time of a use of force that turned out to be based on an officer’s misunderstanding of circumstances, the officer’s understanding was reasonable (or something like that — it’s been a while since I dealt with this sort of law on a regular basis). It wouldn’t take much to apply something similar to a case where a military officer thought there was a ticking bomb (to say nothing of prosecution in cases like this being exceptionally unlikely).