Improved handling of exponents of polynomials.