As @nasthagiri found, this check is not really good enough-- it should be verifying that the indices for the group are also correct (you can have 3 children, but the indices in group_id_to_child don't match). We will fix this up in our next story, which will handle every variation....