Fix unwanted integral expansion

- cause by failure to handle sympy.integrals.risch.NonElementaryIntegral
- includes a new test to prevent regression