Fixed a bug in matchFamilies where it would assign the same parent family twice.