Fixed updating dangerous functions restrictions when dangerous enabled

Fixes #1742