fix forward port of #46751
fix forward port of #46751

self.opts key 'environment' have been renamed to 'saltenv' after 2017.7,
thus the forward port broke the 'same' merging strategy again.

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt