That was quite an unusual bug. Some deep internals of Discourse were modifying an object in a way it shouldn’t have been, and it was bubbling up in this peculiar way. Here’s a fix:
It will go out the next time we deploy BBS. Thanks for all your help everyone!