https://github.com/sympy/sympy/pull/2066