"An AI set up to do the same job could also have such a scenario built in."
Which nicely sums up where AI is at the moment - there's still no "intelligence" that can realistically consider situations like this, in the way a human can, outside of its programming. What if someone had even thought about this in advance and added a rule like "do not launch counter-attack if missiles <= 5". What then if 6 "missiles" had been detected? Until such time as AIs can really play a hundred games of tic-tac-toe and come to the conclusion that "the only winning move is not to play", then it's just not safe enough to work in this sort of application.