It might be waived in the event of an imminent action. Sort it out after the threat of the action is over.
Same with torture and other unethical activities. Think you can save the city from nuclear destruction by torturing the brown-skinned guy? Sure, go for it. But you'd better hope you're right, because (at least in a just world) that's the only way you're staying out of prison for the rest of your life.