Make sympy_parser work with evaluate=0. Fixes #7663