If one calls `fundrawtransaction`, the change address will be retrieved from the keypool, though, this key/address will always be returned to the pool, leading to the problem that the next `getnewaddress()` call will restult in the same key/address.

Either we remove the auto-change-address (users would need to call `getrawchangeaddress` first [current best practice anyway]) or we add a call to keep/mark a specific key/address as change (after one have sent the funded raw transaction).

Reported by @NicolasDorier on IRC.
+ HelpExampleCli("getreceivedbyaccount", "\"tabby\" 6") +
            "\nAs a json rpc call\n"
            + HelpExampleRpc("getreceivedbyaccount", "\"tabby\", 6")
        );
    LOCK2(cs_main, pwalletMain->cs_wallet);
    
    int nMinDepth = 1;
    if (request.params.size() > 1)
        nMinDepth = request.params[1].get_int();
    
    string strAccount = AccountFromValue(request.params[0]);
    set<CTxDestination> setAddress = pwalletMain->GetAccountAddresses(strAccount);
    
    CAmount nAmount = 0;
    for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
    {
        const CWalletTx& wtx = (*it).second;
        if (wtx.IsCoinBase() || !CheckFinalTx(*wtx.tx))
            continue;
        BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
        {
            CTxDestination address;
            if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwalletMain, address) && setAddress.count(address))
                if (wtx.GetDepthInMainChain() >= nMinDepth)
                    nAmount += txout.nValue;
        }
    }
    return ValueFromAmount(nAmount);
}
UniValue getbalance(const JSONRPCRequest& request)