That's not the algorithm! You have to group by product, filter out everything that has only one answer, and then observe that the two-answer one has the right ambiguity. (Or, alternatively, also filter out everything where there is more than one answer with an eldest child, and observe that there is exactly one thing left after filtering.)