The wallet doesn’t only rebroadcast transactions it created, but also relevant transactions received via p2p. Since this is not self-evident, add test coverage for it.
Will keep this in draft for now, because the added test fails intermittently on master. After debugging this I think it is due to a wallet bug, which is fixed in the separate PR #34358. I rebased this PR on #34358.