See PHI1096. Depends on D20213. An install is reporting a hard-to-reproduce issue where a non-transaction gets queued by Herald somehow. This might be in third-party code.
Sprinkle the relevant parts of the code with final and type checking to try to catch the problem before it causes a fatal we can't pull a stack trace out of.