Raise informative error for exponentiation to negative power (see #3024)