private boolean pruneLongMvvValues(final Tree tree, final List<PrunedVersion> prunedVersions,
            final List<PersistitException> deferredExceptions, final List<Long> toDeallocate) {

        boolean changed = false;
        for (int p = KEY_BLOCK_START; p < _keyBlockEnd; p += KEYBLOCK_LENGTH) {
            final int kbData = getInt(p);
            final int tail = decodeKeyBlockTail(kbData);
            final int tbData = getInt(tail);
            final int klength = decodeTailBlockKLength(tbData);
            final int oldTailSize = decodeTailBlockSize(tbData);
            final int offset = tail + _tailHeaderSize + klength;
            final int oldSize = oldTailSize - klength - _tailHeaderSize;

            if (oldSize > 0) {
                int valueByte = _bytes[offset] & 0xFF;
                if (isLongMVV(_bytes, offset, oldSize)) {
                    final Value value = _persistit.getThreadLocalValue();
                    boolean pruned = false;
                    try {
                        pruned = pruneLongMvv(_bytes, offset, oldSize, value, prunedVersions, toDeallocate);
                    } catch (PersistitException pe) {
                        deferredExceptions.add(pe);
                    }
                    if (pruned) {
                        changed = true;
                        int newSize = value.getEncodedSize();
                        assert newSize <= oldSize : "Pruned long value overflow";
                        System.arraycopy(value.getEncodedBytes(), 0, _bytes, offset, newSize);
                        int newTailSize = klength + newSize + _tailHeaderSize;
                        int oldNext = (tail + oldTailSize + ~TAILBLOCK_MASK) & TAILBLOCK_MASK;
                        int newNext = (tail + newTailSize + ~TAILBLOCK_MASK) & TAILBLOCK_MASK;
                        if (newNext < oldNext) {
                            // Free the remainder of the old tail block
                            deallocTail(newNext, oldNext - newNext);
                        } else {
                            Debug.$assert0.t(newNext == oldNext);
                        }
                        // Rewrite the tail block header
                        putInt(tail, encodeTailBlock(newTailSize, klength));
                        valueByte = newSize > 0 ? _bytes[offset] & 0xFF : -1;
                        value.changeLongRecordMode(false);
                    }
                }
                if (pruneAntiValue(valueByte, p, tree)) {
                    changed = true;
                    p -= KEYBLOCK_LENGTH;
                }
            }
        }

        if (Debug.ENABLED && changed) {
            assertVerify();
        }
        return changed;
    }