Fix infinite recursion when Summing a Piecewise.
Fix infinite recursion when Summing a Piecewise.

Fixes github issue #2597.

maniteja123/sympy,maniteja123/sympy,shikil/sympy,jbbskinny/sympy,sahilshekhawat/sympy,souravsingh/sympy,AkademieOlympia/sympy,kaichogami/sympy,mcdaniel67/sympy,aktech/sympy,Designist/sympy,atsao72/sympy,aktech/sympy,wyom/sympy,yukoba/sympy,Mitchkoens/sympy,lindsayad/sympy,Titan-C/sympy,Designist/sympy,dqnykamp/sympy,Vishluck/sympy,skirpichev/omg,drufat/sympy,abhiii5459/sympy,bukzor/sympy,asm666/sympy,maniteja123/sympy,Shaswat27/sympy,hargup/sympy,rahuldan/sympy,hargup/sympy,Sumith1896/sympy,saurabhjn76/sympy,oliverlee/sympy,ChristinaZografou/sympy,garvitr/sympy,oliverlee/sympy,ga7g08/sympy,jaimahajan1997/sympy,VaibhavAgarwalVA/sympy,Curious72/sympy,emon10005/sympy,atreyv/sympy,pandeyadarsh/sympy,hargup/sympy,cswiercz/sympy,Curious72/sympy,iamutkarshtiwari/sympy,skidzo/sympy,toolforger/sympy,cswiercz/sympy,wanglongqi/sympy,debugger22/sympy,meghana1995/sympy,ahhda/sympy,liangjiaxing/sympy,beni55/sympy,debugger22/sympy,cccfran/sympy,jerli/sympy,abhiii5459/sympy,iamutkarshtiwari/sympy,vipulroxx/sympy,kumarkrishna/sympy,pbrady/sympy,toolforger/sympy,Arafatk/sympy,beni55/sympy,shipci/sympy,sampadsaha5/sympy,AkademieOlympia/sympy,cccfran/sympy,jamesblunt/sympy,VaibhavAgarwalVA/sympy,emon10005/sympy,souravsingh/sympy,bukzor/sympy,meghana1995/sympy,liangjiaxing/sympy,lindsayad/sympy,madan96/sympy,farhaanbukhsh/sympy,Davidjohnwilson/sympy,AunShiLord/sympy,meghana1995/sympy,jbbskinny/sympy,mafiya69/sympy,asm666/sympy,jbbskinny/sympy,aktech/sympy,sunny94/temp,sahmed95/sympy,Mitchkoens/sympy,postvakje/sympy,abhiii5459/sympy,MridulS/sympy,toolforger/sympy,rahuldan/sympy,Gadal/sympy,kevalds51/sympy,Sumith1896/sympy,Vishluck/sympy,yashsharan/sympy,drufat/sympy,garvitr/sympy,sahmed95/sympy,Titan-C/sympy,MridulS/sympy,yukoba/sympy,atsao72/sympy,atreyv/sympy,moble/sympy,mcdaniel67/sympy,debugger22/sympy,farhaanbukhsh/sympy,rahuldan/sympy,wanglongqi/sympy,shikil/sympy,Davidjohnwilson/sympy,skidzo/sympy,madan96/sympy,AunShiLord/sympy,jaimahajan1997/sympy,liangjiaxing/sympy,kevalds51/sympy,chaffra/sympy,mcdaniel67/sympy,kumarkrishna/sympy,madan96/sympy,Vishluck/sympy,bukzor/sympy,jamesblunt/sympy,abloomston/sympy,moble/sympy,jerli/sympy,ga7g08/sympy,skidzo/sympy,sahmed95/sympy,kaushik94/sympy,Arafatk/sympy,jamesblunt/sympy,yashsharan/sympy,grevutiu-gabriel/sympy,ChristinaZografou/sympy,sunny94/temp,kaushik94/sympy,cswiercz/sympy,grevutiu-gabriel/sympy,kumarkrishna/sympy,postvakje/sympy,MechCoder/sympy,kaichogami/sympy,Curious72/sympy,kaushik94/sympy,AunShiLord/sympy,ga7g08/sympy,abloomston/sympy,pandeyadarsh/sympy,yukoba/sympy,jerli/sympy,wanglongqi/sympy,abloomston/sympy,Gadal/sympy,saurabhjn76/sympy,wyom/sympy,dqnykamp/sympy,iamutkarshtiwari/sympy,pbrady/sympy,Titan-C/sympy,Shaswat27/sympy,kevalds51/sympy,pbrady/sympy,wyom/sympy,ChristinaZografou/sympy,sampadsaha5/sympy,VaibhavAgarwalVA/sympy,ahhda/sympy,sahilshekhawat/sympy,asm666/sympy,kaichogami/sympy,sampadsaha5/sympy,saurabhjn76/sympy,Shaswat27/sympy,yashsharan/sympy,AkademieOlympia/sympy,vipulroxx/sympy,Sumith1896/sympy,drufat/sympy,jaimahajan1997/sympy,emon10005/sympy,dqnykamp/sympy,postvakje/sympy,Mitchkoens/sympy,Davidjohnwilson/sympy,atreyv/sympy,MechCoder/sympy,garvitr/sympy,mafiya69/sympy,oliverlee/sympy,beni55/sympy,lindsayad/sympy,souravsingh/sympy,vipulroxx/sympy,diofant/diofant,pandeyadarsh/sympy,shipci/sympy,mafiya69/sympy,Arafatk/sympy,shipci/sympy,ahhda/sympy,shikil/sympy,cccfran/sympy,chaffra/sympy,MechCoder/sympy,chaffra/sympy,Gadal/sympy,MridulS/sympy,Designist/sympy,atsao72/sympy,moble/sympy,sahilshekhawat/sympy,sunny94/temp,farhaanbukhsh/sympy,grevutiu-gabriel/sympy