This is a follow-up to d2cbb4ba81.
A few exceptions have since been added to the wrapper.
To avoid that and give a way out to the callers, 2 new flags are added
to bypass the default protection.
The allowlist of variables that was created is replaced by these flags.
Also added tests to cover these cases.