do_wait: fix waiting for the group stop with the dead leader