oh and also, if you look at this pseudo code again:
// business application pseudo-code
while( num_tries++ < max_tries ) {
fee = rpc.calcsendfee( address, amount )
if( not fee_is_ok( fee ) )
break;
code = rpc.sendtoaddress( address, amount, .., fee )
if( code != insufficient_fee ) {
break;
}
}
Notice that there is a new fee parameter to sendtoaddress(), which in this case is the value returned by calcsendfee().
That fee would act as a limit for sendtoaddress. So if the fee that sendtoaddress generates pseudo-randomly is higher than the limit, then it would not send and would return an "insufficient fee" code. If it is less or equal, then it would send.
So I believe that handles your objection.