Fixed on demand restricting for dangerous methods with whitelists

Fixed #1653