bug fix -error in check for duplicates caused by duplicates within source.