All it takes is to go through all the "inputs" of all the transactions in the stale block(s) and then find each and every one of them in the replacing blocks (in the actual chain) and see if the "outputs" are still the same or are similar.
pseudocode
int max = staleBlock.TransactionList.Count - 1;
for (int i = 1 to max)
if (chain.contains(staleBlock.TransactionList[i].TransactionHash)
is_not_double_spent
else
for (int j = 0 to staleBlock.TransactionList[i].Inputs.Count)
transaction newTx = chain.FindTxContaining(staleBlock.TransactionList[i].Inputs)
if (newTx.Outputs is similar to staleBlock.TransactionList[i].Outputs
is_not_double_spent
else
is_double_spent