Don't try to lock the same formula more than once

Fixes #28765.
Stop using superenv? method to dump ENV
Don't fetch the value just to throw it away
Remove ENV variable that is no longer used
Remove obsolete text