This should not needed.  The pop ensures that `_on_timeout` is not called (either by using `callback.unregister` or `callback.replace_register`).

Can you tell me how to reproduce the bug that requires this fix?