Fix for #10656: __env__ should be passed around instead of env
Merge pull request #11117 from fsniper/develop

Fix for #10656: __env__ should be passed around instead of env