Switch back to previous Thread.recursion_guard() API.
Switch API on Thread.recursion_guard_outer() as well.