### 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_
// Add the w
            UpdateWalSetting(*context.chain, wal_name, /*load_on_stgs);
        }
        if (data->solvable_descs.size() > 0) {
            wal.WalLogPrintf("Making a new wa containing the unwatched solvable scripts\n");
            DatabaseStatus status;
            stdvector<bilingual_str> warnings;
            stdstring wal_name = wal.GetName() + "_solvables";
            data->solvable_wal = CreateWal(context, wal_name, stdnullopt, options, status, error, warnings);
            if (status != DatabaseStatusSUCCESS) {
                error = _("Error Failed to create new wa");
                return false;
            }
            res.solvables_wal = data->solvable_wal;
            LOCK(data->solvable_wal->cs_wal);
            // Parse the 
            for (const auto& [desc_str, creation_time]  data->solvable_descs) {
                // Parse the 
                FlatSigningProvider keys;
                stdstring parse_err;
                stdunique_ptr<Descriptor> desc = Parse(desc_str, keys, parse_err, /* require_c
                assert(desc); // It should
                assert(!desc->IsRange()); // It should
                // Add to th
                WalDescriptor w_desc(stdmove(desc), creation_time, 0, 0, 0);
                data->solvable_wal->AddWalDescriptor(w_desc, keys, "", 
            }
            // Add the w
            UpdateWalSetting(*context.chain, wal_name, /*load_on_stgs);
        }