Always extend locals with env and contents before passing them to a view