LPS-37833 Serializer.writeString() can potentially cause ArrayIndexOutOf...

...BoundsException