Avoid unregister when exiting from children and run_at_exit_hooks == true