Internal: Fix a very rare case of corruption in replication compression.

See CorruptedCompressorTests for details on how this bug can be hit.