Transactions in a block are ordered so it could use the first transaction.
Or the mastercoins could be destroyed in this case.
How is this order defined; is it defined on the protocol level? If so I was unaware of this.
The miner chooses in which order to put the transactions. (If there are dependencies, a tx must come before those that depend on it.) Once he sets the order it is a fixed property of the block, putting the txs in a different order would result in a different Merkle root and thus invalid block hash.
Awesome, thanks for the information. I will look into this