We have the `withenv` helper (https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util.rb#L42) to handle cases where the environment is being set like this; it would be better to use that method here instead of directly modifying the environment.