Fixes #6845 - Fix undefined method puppet_env for nil

The code was trying to update the content view environment that no longer
exists. So in content view environment destroy, we'll skip updating the
environment since it's gone by the run phase.