Fix remove_dead_branches algorithm