Fix serialization/deserialization problem with hierarchy in FileBatchPersister
Small serialization size optimization