Right. But they still would have died, only the ones without a commander would unstealth, attack and retreat to die.
You'd think stealthy troops would have the common sense to stay hidden even without a commander. But I don't think the stealth/patrolling mechanism allows it.