Fix for listenToOnce mem. leak

This is a failing test demonstrating #3226, then a patch that makes the test pass.
This isn't so rigorous. Should I explicitly verify that the handler is registered under `b`?