fix type instability in quadratic constraint processing