addmultisigaddress creates an address respecting the setting, being unable to generate a specific type of address without also adding it to the wallet seems wrong.

I suppose in the future `addresstype` may be refactored to be wallet-specific, which would leave this non-wallet rpc call without an argument. Perhaps there should just be an optional parameter to set it.
}
        bool hd_upgrade = false;
        bool split_upgrade = false;
        if (walletInstance->CanSupportFeature(FEATURE_HD) && !walletInstance->IsHDEnabled()) {
            LogPrintf("Upgrading wallet to HD\n");
            walletInstance->SetMinVersion(FEATURE_HD);
            
            CPubKey masterPubKey = walletInstance->GenerateNewSeed();
            if (!walletInstance->SetHDSeed(masterPubKey)) {
                throw std::runtime_error(std::string(__func__) + ": Storing master key failed");
            }
            hd_upgrade = true;
        }
        
        if (walletInstance->CanSupportFeature(FEATURE_HD_SPLIT)) {
            LogPrintf("Upgrading wallet to use HD chain split\n");
            walletInstance->SetMinVersion(FEATURE_PRE_SPLIT_KEYPOOL);
            split_upgrade = FEATURE_HD_SPLIT > prev_version;
        }
        
        if (split_upgrade) {
            walletInstance->MarkPreSplitKeys();
        }
        
        if (hd_upgrade) {
            if (!walletInstance->TopUpKeyPool()) {
                InitError(_("Unable to generate keys") += "\n");
                return nullptr;
            }
        }