Fix to simplification when folding exponents.