Fix TransactionIterator bug if pushed items

Previously items that were pushed and consumed within a transaction
leaked even if the transaction failed.