add new set
NSMutableSet *linkedPersonsToSkip = [[NSMutableSet alloc] init];
and just check for each person
if ([linkedPersonsToSkip containsObject:(__bridge id)(record)]) {
continue;
}
NSArray *linked = (__bridge NSArray *) ABPersonCopyArrayOfAllLinkedPeople(record);
if ([linked count] > 1) {
[linkedPersonsToSkip addObjectsFromArray:linked];
}