AcceptToMemoryPool expecttransaction to be passed in one by one in topological order. As a result, many transaction gets rejected because input are not available.
The obvious long term solution is to refactor memory pool acceptance, but in the meantime, we can ensure topological order when we reinsert transactions in the mempool after reorgs.