More hardening against monkey patching.