wallet: fix migration with watch-only transactions

bitcoin/bitcoin: PR #36825

The review is inconclusive; no findings were published.

Coverage details