Factored out "suppressGetenvAccess()" method

Issue: SPR-11297
Polishing

Issue: SPR-11297