Avoid 'self' variable assignments

Resolves #8362. 
> "fgrep -R ' self = ' sympy/|wc -l" initially gave

36