Fix reindex bug when a document get unindex and index again inside the same transaction.