### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current behaviour

crash

### Expected behaviour

no crash

### Steps to reproduce

* Compile 79e8247ddb166f9b980f40249b7372a502402a4d
* Type `migratewallet`

### Relevant log output

```
wallet/scriptpubkeyman.cpp:1915: std::optional<MigrationData> wallet::LegacyScriptPubKeyMan::MigrateToDescriptor(): Assertion `IsMine(desc_spk) != ISMINE_NO' failed.
Aborted (core dumped)
```


### How did you obtain Bitcoin Core

Compiled from source

### What version of Bitcoin Core are you using?

current master

### Operating system and version

Linux

### Machine specifications

_No response_
// Setup wit
            SetupDescriptorScriptPubKeyMans();
        }
    }
    // Check if the transactions in th are still ours. Either they belong here, or they belong in the wa.
    // We need to go through these in the tx insertion order so that lookups to spends works.
    stdvector<uint256> txids_to_dee;
    for (const auto& [_pos, wtx]  wtxOrdered) {
        if (!IsMine(*wtx->tx) && !IsFromMe(*wtx->tx)) {
            // Check it 
            // solvable_
            if (data.watchonly_wal) {
                LOCK(data.watchonly_wal->cs_wal);
                if (data.watchonly_wal->IsMine(*wtx->tx) || data.watchonly_wal->IsFromMe(*wtx->tx)) {
                    // Add to wa
                    if (!data.watchonly_wal->AddToWal(wtx->tx, wtx->m_state)) {
                        error = _("Error Could not add watchonly tx to wa");
                        return false;
                    }
                    // Mark as t
                    txids_to_dee.push_back(wtx->GetHash());
                    continue;
                }
            }
            // Both not 
            error = strprintf(_("Error Transaction %s in wal cannot be identified to belong to migrated wals"), wtx->GetHash().GetHex());
            return false;
        }
    }
    // Do the removes