Noticed this as we use Luwak which creates a MemoryIndex(true, true) storing both offsets and payloads (though in reality we never put any payloads in it).
We used to use MemoryIndex.toString() for debugging and noticed it broke in Lucene 5.x and beyond. I think
LUCENE-6155 broke it when it added support for payloads?
Creating default memoryindex (as all the tests currently do) works fine, as does one with just offsets, it is just the payload version which is broken.