A major power can afford a military debacle only when it looks like a political victory.