That's a bug.
The non-Array case is tested in neither this Serializer not in xhtml

That should probably be fixed as well