Check discrepancies before flagging as primary

This change only reverses the order in which the is_primary field is
populated. Records that have known discrepancies are now populated with
'N' first, then records that have some sort of match are populated with
'Y'.