The judge in the case said prosecutors had failed to take “common sense precautions” to avoid a constitutional problem using statements by the guards.