A test might naively set up on-commit callbacks in a test's transaction (and not execute them) before we enter a transaction block later in the test.
As it stands, that would then cause the callbacks to be executed after the transaction exits. We should default to raising an error when entering the transaction instead (and offer a setting to opt out of this behaviour).