Make sure that inferred dependencies have no duplicates