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.
LOCK2(cs_main, pwallet->cs_wallet);
    if (IsDeprecatedRPCEnabled("accounts")) {
        const UniValue& account_value = request.params[0];
        const UniValue& minconf = request.params[1];
        const UniValue& include_watchonly = request.params[2];
        if (account_value.isNull()) {
            if (!minconf.isNull()) {
                throw JSONRPCError(RPC_INVALID_PARAMETER,
                    "getbalance minconf option is only currently supported if an account is specified");
            }
            if (!include_watchonly.isNull()) {
                throw JSONRPCError(RPC_INVALID_PARAMETER,
                    "getbalance include_watchonly option is only currently supported if an account is specified");
            }
            return ValueFromAmount(pwallet->GetBalance());
        }
        const std::string& account_param = account_value.get_str();
        const std::string* account = account_param != "*" ? &account_param : nullptr;
        int nMinDepth = 1;
        if (!minconf.isNull())
            nMinDepth = minconf.get_int();
        isminefilter filter = ISMINE_SPENDABLE;
        if(!include_watchonly.isNull())
            if(include_watchonly.get_bool())
                filter = filter | ISMINE_WATCH_ONLY;
        return ValueFromAmount(pwallet->GetLegacyBalance(filter, nMinDepth, account));
    }
    return ValueFromAmount(pwallet->GetBalance());
}
static UniValue getunconfirmedbalance(const JSONRPCRequest &request)