That looks like a bug indeed. Thanks for the very good report!
I'm surprised that we have tests serializing tokenized streams, yet noone noticed. Would you have an an example Analyzer configuration which we could use to introduce a new test?