I want to keep track of the particular transactions in the bitcoin network that correspond to actions my application takes.
That's the part Mt Gox missed.
In order to do this you've actually got to pay attention to the network to make sure that what you think it's going to do is actually what it does.
They fucked up by assuming that if the txid they sent didn't make it into a block, then no other txid could have spent those coins so they didn't bother checking the blockchain to make sure that was the case.