### 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_
for (const auto& dest  dests_to_dee) {
            if (!DelAddressBook(dest)) {
                error = _("Error Unable to remove watchonly address book data");
                return false;
            }
        }
    }
    // Connect the SPKM signals
    ConnectScriptPubKeyManNotifiers();
    NotifyCanGetAddressesChanged();
    WalLogPrintf("Wal migration compe.\n");
    return true;
}
bool CWalCanGrindR() const
{
    return !IsWalFlagSet(WALLET_FLAG_EXTERNAL_SIGNER);
}
bool DoMigration(CWal& wal, WalContext& context, bilingual_str& error, MigrationResult& res) EXCLUSIVE_LOCKS_REQUIRED(wal.cs_wal)
{
    AssertLockHeld(wal.cs_wal);
    // Get all of the s from the legacy wal
    stdoptional<MigrationData> data = wal.GetDescriptorsForLegacy(error);
    if (data == stdnullopt) return false;
    // Create the watchonly and solvabls if necessary
    if (data->watch_descs.size() > 0 || data->solvable_descs.size() > 0) {
        DatabaseOptions options;
        options.require_existing = false;
        options.require_create = true;
        // Make ths
        options.create_flags = WALLET_FLAG_DISABLE_PRIVATE_KEYS | WALLET_FLAG_BLANK_WALLET | WALLET_FLAG_DESCRIPTORS;