This doesn't look right. In the original code, `leak_policy_exit::visit_app_instructions` was invoked. Here you're calling `leak_policy_enter::visit_app_instructions`, which will cause infinite recursion, which will blow your stack. This is a bug.

My suggestion is to take the implementation of `leak_policy_exit::visit_app_instructions`, factor it out into its own `static` function, and invoke that function wherever it's needed.