fix side effect in get_unspent_coins, causing transactions to be rejected