This causes another problem. Even if you have a lot of coins from a former transaction, when you spent a little the remainder coins (change) have to be blocked for 1 hour (6 blocks) until the transaction is "confirmed".
The standard client just assumes that the transaction is legit and you can use the remaining coins immediately. But to use these coins the program has to know the ID of the transaction.
But due to the malleability, it's possible that the ID that is generated in your client is not the same ID that is finally added to the blockchain. If you use the original ID and it is changued, then the next transactions will be invalid. So you must wait to see the final ID and use it to create the next transactions.