This requires to allow the users to select one borrowing column before. The rule should be simply: if this column has any value, just exclude the cognate set (that is: treat it as a singleton).
The question is in principle, whether this is really needed, given that one could also simply have two COGID columns, one in which borrowings are included, one where they are given unique IDs.