Fix likely infinite loop in reap_any_dead_children