Should fix #26364
I can't reproduce this, but my guess would be that PeerNoVerack::on_version, which sends the wtxidrelay message, is executed in the event loop and thus may run after the main thread sending msg_verack.
Also, fix another bug.
Finally, add some assert_debug_log to ensure the right code branch is executed (and not some random, unrelated disconnect).