It was a quirky special case where the size calculation got wrong when a mapping data block was copied in some functions. It's necessary to get deleted but still remembered entries (aka T_DELETED) on the internal free list in the data block for this to happen (see comment blurb near the top of multiset.h).
That typically happens when you have an active iterator (which you do in a foreach) for a multiset and delete elements in it at the same time. For some reason a break statement is necessary to keep the multiset in that state. I didn't investigate why that is so.