Fixes #4697: check-rudder-agent script can't access some variables due t...

...o change in #4695