More fixes to flatfile serializer.
Merged.