Fix the function name replacement when going from sympy --> str