[GlobalPropertyOpt] Simplify the code a little bit. NFCI.
[GlobalPropertyOpt] Simplify the code a little bit. NFCI.

Use getFunction() instead of recursive calls to getParent() and
return early.

ahoppen/swift,alblue/swift,stephentyrone/swift,karwa/swift,atrick/swift,huonw/swift,zisko/swift,parkera/swift,gribozavr/swift,aschwaighofer/swift,parkera/swift,karwa/swift,ahoppen/swift,danielmartin/swift,atrick/swift,shajrawi/swift,zisko/swift,alblue/swift,uasys/swift,harlanhaskins/swift,ahoppen/swift,nathawes/swift,gribozavr/swift,JGiola/swift,shajrawi/swift,zisko/swift,frootloops/swift,roambotics/swift,roambotics/swift,parkera/swift,austinzheng/swift,devincoughlin/swift,OscarSwanros/swift,tjw/swift,xedin/swift,practicalswift/swift,glessard/swift,sschiau/swift,shahmishal/swift,OscarSwanros/swift,xedin/swift,gregomni/swift,austinzheng/swift,hooman/swift,parkera/swift,OscarSwanros/swift,sschiau/swift,brentdax/swift,shajrawi/swift,gribozavr/swift,amraboelela/swift,JGiola/swift,roambotics/swift,rudkx/swift,parkera/swift,uasys/swift,glessard/swift,xedin/swift,ahoppen/swift,sschiau/swift,devincoughlin/swift,gribozavr/swift,atrick/swift,airspeedswift/swift,amraboelela/swift,austinzheng/swift,hooman/swift,hooman/swift,airspeedswift/swift,allevato/swift,benlangmuir/swift,xwu/swift,xedin/swift,karwa/swift,tkremenek/swift,CodaFi/swift,jopamer/swift,jopamer/swift,shahmishal/swift,xedin/swift,zisko/swift,aschwaighofer/swift,aschwaighofer/swift,gregomni/swift,atrick/swift,practicalswift/swift,brentdax/swift,roambotics/swift,gregomni/swift,harlanhaskins/swift,danielmartin/swift,jopamer/swift,uasys/swift,tkremenek/swift,jckarter/swift,jckarter/swift,jmgc/swift,atrick/swift,lorentey/swift,gribozavr/swift,swiftix/swift,shajrawi/swift,brentdax/swift,stephentyrone/swift,sschiau/swift,jmgc/swift,airspeedswift/swift,natecook1000/swift,natecook1000/swift,JGiola/swift,gregomni/swift,frootloops/swift,roambotics/swift,stephentyrone/swift,parkera/swift,roambotics/swift,brentdax/swift,benlangmuir/swift,glessard/swift,benlangmuir/swift,danielmartin/swift,apple/swift,swiftix/swift,sschiau/swift,sschiau/swift,aschwaighofer/swift,benlangmuir/swift,tjw/swift,xwu/swift,brentdax/swift,harlanhaskins/swift,nathawes/swift,devincoughlin/swift,jopamer/swift,jckarter/swift,tkremenek/swift,hooman/swift,natecook1000/swift,xwu/swift,OscarSwanros/swift,apple/swift,parkera/swift,CodaFi/swift,OscarSwanros/swift,allevato/swift,gregomni/swift,frootloops/swift,alblue/swift,jmgc/swift,huonw/swift,allevato/swift,amraboelela/swift,lorentey/swift,xedin/swift,zisko/swift,harlanhaskins/swift,danielmartin/swift,austinzheng/swift,CodaFi/swift,shahmishal/swift,jopamer/swift,airspeedswift/swift,ahoppen/swift,aschwaighofer/swift,swiftix/swift,amraboelela/swift,shahmishal/swift,gribozavr/swift,danielmartin/swift,alblue/swift,devincoughlin/swift,frootloops/swift,tkremenek/swift,practicalswift/swift,tkremenek/swift,lorentey/swift,rudkx/swift,rudkx/swift,shahmishal/swift,airspeedswift/swift,karwa/swift,devincoughlin/swift,aschwaighofer/swift,amraboelela/swift,shahmishal/swift,hooman/swift,jckarter/swift,alblue/swift,glessard/swift,tjw/swift,hooman/swift,lorentey/swift,apple/swift,shajrawi/swift,jckarter/swift,apple/swift,tjw/swift,zisko/swift,nathawes/swift,benlangmuir/swift,danielmartin/swift,uasys/swift,glessard/swift,allevato/swift,gribozavr/swift,natecook1000/swift,amraboelela/swift,swiftix/swift,xwu/swift,shahmishal/swift,CodaFi/swift,JGiola/swift,glessard/swift,shajrawi/swift,karwa/swift,CodaFi/swift,gregomni/swift,parkera/swift,xwu/swift,alblue/swift,allevato/swift,practicalswift/swift,rudkx/swift,lorentey/swift,tkremenek/swift,harlanhaskins/swift,lorentey/swift,rudkx/swift,huonw/swift,zisko/swift,rudkx/swift,karwa/swift,sschiau/swift,aschwaighofer/swift,practicalswift/swift,brentdax/swift,frootloops/swift,nathawes/swift,OscarSwanros/swift,jopamer/swift,amraboelela/swift,xedin/swift,jmgc/swift,austinzheng/swift,practicalswift/swift,harlanhaskins/swift,xedin/swift,CodaFi/swift,danielmartin/swift,jmgc/swift,alblue/swift,harlanhaskins/swift,lorentey/swift,atrick/swift,jopamer/swift,uasys/swift,frootloops/swift,stephentyrone/swift,austinzheng/swift,tjw/swift,shajrawi/swift,allevato/swift,stephentyrone/swift,stephentyrone/swift,JGiola/swift,tjw/swift,xwu/swift,uasys/swift,gribozavr/swift,huonw/swift,allevato/swift,natecook1000/swift,devincoughlin/swift,tkremenek/swift,airspeedswift/swift,jckarter/swift,practicalswift/swift,karwa/swift,devincoughlin/swift,sschiau/swift,brentdax/swift,xwu/swift,tjw/swift,natecook1000/swift,huonw/swift,hooman/swift,karwa/swift,swiftix/swift,shajrawi/swift,jmgc/swift,shahmishal/swift,ahoppen/swift,airspeedswift/swift,austinzheng/swift,swiftix/swift,lorentey/swift,nathawes/swift,huonw/swift,jmgc/swift,devincoughlin/swift,practicalswift/swift,uasys/swift,CodaFi/swift,huonw/swift,JGiola/swift,nathawes/swift,apple/swift,OscarSwanros/swift,frootloops/swift,jckarter/swift,nathawes/swift,benlangmuir/swift,stephentyrone/swift,natecook1000/swift,swiftix/swift,apple/swift