When a low-feerate parent is rejected as TX_RECONSIDERABLE, MempoolRejectedTx calls m_txrequest.ForgetTxHash(ptx->GetWitnessHash()) (txdownloadman_impl.cpp:473). For a transaction without witness, wtxid == txid, so this also deletes the txid requests that MaybeAddOrphanResolutionCandidate queued for every peer that announced the orphan child.
If the parent then comes from a peer that did not announce the child:
Find1P1CPackageonly pairs the parent with children from the same peer, so no package is formed- the child's announcers are never asked for the parent
- the child stays in the orphanage until some new peer announces it
With a segwit parent the txid differs from the wtxid, so the txid requests survive and the package gets accepted. A legacy (P2PK) parent is affected.
This skips ForgetTxHash when the result is TX_RECONSIDERABLE and the tx has no witness. New wtxid announcements of that parent are still ignored through AlreadyHaveTx(include_reconsiderable=true). The cost is that announcements already queued may download the parent once more.
The new test_parent_from_other_peer in p2p_opportunistic_1p1c.py runs for a segwit and a legacy parent: peer A sends the child (orphan), peer B sends the low-fee parent, then it checks that A is asked for the parent by txid and the package is accepted. On master the legacy case times out waiting for that request; with the change it passes. p2p_orphan_handling.py and p2p_tx_download.py still pass.