This court martial took something like five years. In an actual war it would have taken five hours. Or a court martial wouldn't have been necessary.
I seem to recall that, shortly after it was discerned this scumbag was the murderer, a one man guard was placed on him for a short period of time while the MP's were gotten or some such .....
So I differ with your statement ... in an actual war, when a treacherous, murderin' spy was found in ranks ... the moment of discovery would be its last moment on planet Earth.
But then .. Falujah would be a glass parking lot also.