Instead of storing an extra array for discriminant values, create an allocation there and store those in an allocation immediately.