While investigating @maflcko's global-state-detector patch (https://github.com/bitcoin/bitcoin/issues/29018#issuecomment-4422112607), I noticed that a global variable may be, or may contain, a pointer to heap-allocated data. Even if the global variable itself remains unchanged, the referenced heap data can still be modified across fuzz inputs, allowing persistent state to escape detection.
The process_message and process_messages targets reuse a single mempool across iterations, but ResetChainman() (invoked only when the block index has grown) rebuilds the chainman without resetting the mempool. A transaction accepted into the mempool by one input would therefore leak into the next iteration.
This is a defensive guard, not a fix for an observed leak. A random payload is extremely unlikely to deserialize into a transaction that also passes AcceptToMemoryPool (its inputs must spend real UTXOs and its scripts must verify), so the mempool is expected to stay empty, and replaying the existing corpus confirms it never grows. Still, asserting the invariant is cheap and would catch any future change, such as a new path that adds to the mempool without full validation, or crafted transaction inputs, that would silently make one iteration depend on another. Having the guard is better than not having it.