Fix matrix generator to produce distinct configurations