Revert "On demand restricting for dangerous functions always enabled"

This reverts commit 16620c8d15b6cd40c5d7add8b6811f130b79b10d.