[Sema] Add defensive guard for implicit use of self in closure check
[Sema] Add defensive guard for implicit use of self in closure check

Add assetion along with defensive guard to avoid crashing in release
build. Hopefully, sourcekitd Stress Tester find a reproducer for the
crash.

rdar://problem/47895109

lorentey/swift,CodaFi/swift,airspeedswift/swift,glessard/swift,JGiola/swift,sschiau/swift,JGiola/swift,karwa/swift,xwu/swift,roambotics/swift,hooman/swift,stephentyrone/swift,sschiau/swift,karwa/swift,karwa/swift,harlanhaskins/swift,shajrawi/swift,CodaFi/swift,roambotics/swift,xedin/swift,roambotics/swift,atrick/swift,atrick/swift,tkremenek/swift,shahmishal/swift,apple/swift,devincoughlin/swift,parkera/swift,xedin/swift,JGiola/swift,parkera/swift,parkera/swift,parkera/swift,jckarter/swift,parkera/swift,harlanhaskins/swift,shajrawi/swift,devincoughlin/swift,stephentyrone/swift,xwu/swift,jckarter/swift,karwa/swift,jmgc/swift,harlanhaskins/swift,nathawes/swift,xedin/swift,jmgc/swift,xedin/swift,gregomni/swift,CodaFi/swift,aschwaighofer/swift,apple/swift,xwu/swift,xedin/swift,sschiau/swift,shahmishal/swift,sschiau/swift,lorentey/swift,jckarter/swift,devincoughlin/swift,nathawes/swift,stephentyrone/swift,xwu/swift,shajrawi/swift,sschiau/swift,nathawes/swift,harlanhaskins/swift,gregomni/swift,airspeedswift/swift,shahmishal/swift,jckarter/swift,aschwaighofer/swift,shajrawi/swift,hooman/swift,CodaFi/swift,shahmishal/swift,ahoppen/swift,xedin/swift,nathawes/swift,rudkx/swift,roambotics/swift,tkremenek/swift,benlangmuir/swift,apple/swift,devincoughlin/swift,allevato/swift,shajrawi/swift,tkremenek/swift,stephentyrone/swift,allevato/swift,tkremenek/swift,shajrawi/swift,rudkx/swift,gregomni/swift,airspeedswift/swift,hooman/swift,shajrawi/swift,parkera/swift,apple/swift,jmgc/swift,ahoppen/swift,benlangmuir/swift,hooman/swift,apple/swift,gregomni/swift,allevato/swift,gribozavr/swift,allevato/swift,roambotics/swift,parkera/swift,karwa/swift,lorentey/swift,airspeedswift/swift,sschiau/swift,jckarter/swift,glessard/swift,benlangmuir/swift,devincoughlin/swift,karwa/swift,xwu/swift,harlanhaskins/swift,gribozavr/swift,parkera/swift,xedin/swift,devincoughlin/swift,gribozavr/swift,gregomni/swift,stephentyrone/swift,hooman/swift,tkremenek/swift,devincoughlin/swift,harlanhaskins/swift,jmgc/swift,sschiau/swift,jckarter/swift,jmgc/swift,xwu/swift,lorentey/swift,xwu/swift,shahmishal/swift,JGiola/swift,apple/swift,aschwaighofer/swift,gribozavr/swift,glessard/swift,lorentey/swift,airspeedswift/swift,devincoughlin/swift,stephentyrone/swift,ahoppen/swift,rudkx/swift,allevato/swift,allevato/swift,gribozavr/swift,glessard/swift,glessard/swift,tkremenek/swift,karwa/swift,jmgc/swift,shahmishal/swift,JGiola/swift,atrick/swift,lorentey/swift,harlanhaskins/swift,gregomni/swift,aschwaighofer/swift,shajrawi/swift,gribozavr/swift,lorentey/swift,sschiau/swift,shahmishal/swift,aschwaighofer/swift,roambotics/swift,karwa/swift,atrick/swift,ahoppen/swift,hooman/swift,nathawes/swift,ahoppen/swift,allevato/swift,jmgc/swift,shahmishal/swift,nathawes/swift,rudkx/swift,lorentey/swift,nathawes/swift,ahoppen/swift,airspeedswift/swift,benlangmuir/swift,atrick/swift,CodaFi/swift,gribozavr/swift,aschwaighofer/swift,hooman/swift,xedin/swift,airspeedswift/swift,tkremenek/swift,glessard/swift,JGiola/swift,jckarter/swift,CodaFi/swift,rudkx/swift,rudkx/swift,stephentyrone/swift,gribozavr/swift,benlangmuir/swift,aschwaighofer/swift,atrick/swift,CodaFi/swift,benlangmuir/swift