Workaround for issue #14125.

Explicitly set __env__ and friends for python file templates.
Merge pull request #14364 from thatch45/develop

Bring develop inline
Merge pull request #14352 from hazaelsan/fix_14125

Workaround for issue #14125.
add some safety to the saltenv additions in the py renderer