I noticed there is a problem with dumpwallet option. It does not seem to dump segwit addresses ("3"), and dumps only the standard one ("1"). Is it a bug or work as intended? How can I perform full dump of an wallet then?
if (vstr.size() < 2)
            continue;
        CBitcoinSecret vchSecret;
        if (vchSecret.SetString(vstr[0])) {
            CKey key = vchSecret.GetKey();
            CPubKey pubkey = key.GetPubKey();
            assert(key.VerifyPubKey(pubkey));
            CKeyID keyid = pubkey.GetID();
            if (pwallet->HaveKey(keyid)) {
                LogPrintf("Skipping import of %s (key already present)\n", EncodeDestination(keyid));
                continue;
            }
            int64_t nTime = DecodeDumpTime(vstr[1]);
            std::string strLabel;
            bool fLabel = true;
            for (unsigned int nStr = 2; nStr < vstr.size(); nStr++) {
                if (boost::algorithm::starts_with(vstr[nStr], "#"))
                    break;
                if (vstr[nStr] == "change=1")
                    fLabel = false;
                if (vstr[nStr] == "reserve=1")
                    fLabel = false;
                if (boost::algorithm::starts_with(vstr[nStr], "label=")) {
                    strLabel = DecodeDumpString(vstr[nStr].substr(6));
                    fLabel = true;
                }
            }
            LogPrintf("Importing %s...\n", EncodeDestination(keyid));
            if (!pwallet->AddKeyPubKey(key, pubkey)) {
                fGood = false;