Fixed repeated on demand restricting for functions with a whitelist