Fix relative uniqueness check