While regtesting with [bitcoin-spock](https://github.com/msgilligan/bitcoin-spock) I noticed at some point the transaction creation via `sendtoaddress -> CreateTransaction()` fails, because the created transaction is larger than `MAX_STANDARD_TX_SIZE`.

During the process a lot of raw transactions are created, which have smallish outputs and when then using `sendtoaddress`, it appears to attempt to create a transaction that spends too many of those dust-ish outputs.

The transaction to create does not have many outputs, but it looks like it's caused by the coin selection, which selects too many inputs. Testing was done with a 0.9 branch, but on the first glimpse I believe this issue is as well be present in 0.10. If this is a known issue, and if there is already a guard against this behavior, I'd be happy about a hint.

Sorry in advance, I do not have a test script to reproduce this issue in an isolated manner. A potential fix would probably require to adjust the coin selection, so that it selects a combination of coins, which, in addition to the size of the rest of the transaction, is still smaller than the limit.

scriptChange = GetScriptForDestination(dest);
        }
        
        
        
        CHECK_NONFATAL(IsValidDestination(dest) != scriptChange.empty());
    }
    CTxOut change_prototype_txout(0, scriptChange);
    coin_selection_params.change_output_size = GetSerializeSize(change_prototype_txout);
    
    int change_spend_size = CalculateMaximumSignedInputSize(change_prototype_txout, &wallet);
    
    
    if (change_spend_size == -1) {
        coin_selection_params.change_spend_size = DUMMY_NESTED_P2WPKH_INPUT_SIZE;
    } else {
        coin_selection_params.change_spend_size = (size_t)change_spend_size;
    }
    
    coin_selection_params.m_discard_feerate = GetDiscardRate(wallet);
    
    FeeCalculation feeCalc;
    coin_selection_params.m_effective_feerate = GetMinimumFeeRate(wallet, coin_control, &feeCalc);
    
    
    if (coin_control.m_feerate && coin_selection_params.m_effective_feerate > *coin_control.m_feerate) {
        return util::Error{strprintf(_("Fee rate (%s) is lower than the minimum fee rate setting (%s)"), coin_control.m_feerate->ToString(FeeEstimateMode::SAT_VB), coin_selection_params.m_effective_feerate.ToString(FeeEstimateMode::SAT_VB))};
    }
    if (feeCalc.reason == FeeReason::FALLBACK && !wallet.m_allow_fallback_fee) {