OPENDJ-2548: DirectoryException while rebuilding index on PDB instance
Due to nested transaction, attributes added in the compressed-schema
during a replaceEntry might be removed in case of a database rollback
caused, for example, by optimistic lock conflict. Problem is that
compressed-schema maintain also an in-memory cache of the attributes
which becomes inconsistent after those rollback.
The fix perform the entry encoding (and as such, the compressed-schema
modification) outside the replaceEntry transaction.