Would be nice so that I could stop debugging DeathHooks, which does what you’re asking for:
There have been a myriad of issues/edge cases with my implementation though, so it’s a bit of a mess. But if you want something quick and dirty, feel free to use it.