This commit doesn't guarantee we'll always catch it. But if this invariant is violated, things can get quite difficult to debug. I found in the Lua Carousel fork that all the xpcalls I keep around were actively hindering my ability to notice this invariant being violated.
IPMYE6WTLGB3AWB7VHGSLBLW6PGDX7AEGKFY3KUTXOCQTFQPU6XAC