Verify value of input address
Transactions don't work like that, so this issue does not arise.

Inputs of a transaction don't specify addresses, they specify previous transactions; more precisely, a particular output from a previous transaction.  The data included in an input is a transaction ID and an output index.

So in the example you cite, the transaction would have to have three inputs: one for each of the two Address1 transctions, and a third for the Address2 transaction.