nir/dead_variables: Respect the modes passed to remove_dead_vars