Fix incorrect bitcasts, refactor code to guard against this error.
Fix incorrect bitcasts, refactor code to guard against this error.

natecook1000/swift,harlanhaskins/swift,hooman/swift,gmilos/swift,roambotics/swift,OscarSwanros/swift,JGiola/swift,manavgabhawala/swift,felix91gr/swift,stephentyrone/swift,xwu/swift,gottesmm/swift,stephentyrone/swift,shahmishal/swift,airspeedswift/swift,benlangmuir/swift,allevato/swift,xwu/swift,calebd/swift,ben-ng/swift,alblue/swift,atrick/swift,jmgc/swift,arvedviehweger/swift,tjw/swift,xedin/swift,danielmartin/swift,tkremenek/swift,karwa/swift,codestergit/swift,roambotics/swift,OscarSwanros/swift,allevato/swift,kstaring/swift,parkera/swift,return/swift,calebd/swift,nathawes/swift,gottesmm/swift,nathawes/swift,roambotics/swift,devincoughlin/swift,allevato/swift,therealbnut/swift,gmilos/swift,gregomni/swift,djwbrown/swift,uasys/swift,ahoppen/swift,bitjammer/swift,tinysun212/swift-windows,shajrawi/swift,stephentyrone/swift,devincoughlin/swift,deyton/swift,karwa/swift,allevato/swift,nathawes/swift,tkremenek/swift,CodaFi/swift,frootloops/swift,lorentey/swift,natecook1000/swift,kstaring/swift,djwbrown/swift,atrick/swift,deyton/swift,kstaring/swift,gmilos/swift,austinzheng/swift,xwu/swift,kstaring/swift,gregomni/swift,tardieu/swift,shahmishal/swift,codestergit/swift,tardieu/swift,uasys/swift,karwa/swift,tjw/swift,benlangmuir/swift,jckarter/swift,JaSpa/swift,hughbe/swift,hooman/swift,hughbe/swift,sschiau/swift,devincoughlin/swift,xwu/swift,CodaFi/swift,jmgc/swift,codestergit/swift,bitjammer/swift,roambotics/swift,arvedviehweger/swift,airspeedswift/swift,xedin/swift,manavgabhawala/swift,swiftix/swift,ben-ng/swift,stephentyrone/swift,natecook1000/swift,manavgabhawala/swift,gregomni/swift,deyton/swift,alblue/swift,Jnosh/swift,ben-ng/swift,glessard/swift,JaSpa/swift,gribozavr/swift,sschiau/swift,xedin/swift,benlangmuir/swift,kstaring/swift,natecook1000/swift,jckarter/swift,xedin/swift,tardieu/swift,jopamer/swift,tinysun212/swift-windows,ben-ng/swift,parkera/swift,huonw/swift,jckarter/swift,OscarSwanros/swift,uasys/swift,practicalswift/swift,harlanhaskins/swift,nathawes/swift,tjw/swift,zisko/swift,hughbe/swift,jmgc/swift,practicalswift/swift,gribozavr/swift,atrick/swift,amraboelela/swift,CodaFi/swift,jtbandes/swift,lorentey/swift,milseman/swift,austinzheng/swift,uasys/swift,allevato/swift,shajrawi/swift,jckarter/swift,tardieu/swift,bitjammer/swift,stephentyrone/swift,gottesmm/swift,return/swift,huonw/swift,lorentey/swift,benlangmuir/swift,brentdax/swift,atrick/swift,amraboelela/swift,gregomni/swift,felix91gr/swift,sschiau/swift,zisko/swift,JaSpa/swift,tinysun212/swift-windows,codestergit/swift,ahoppen/swift,hooman/swift,manavgabhawala/swift,jopamer/swift,djwbrown/swift,uasys/swift,shahmishal/swift,jopamer/swift,devincoughlin/swift,deyton/swift,frootloops/swift,CodaFi/swift,austinzheng/swift,shajrawi/swift,devincoughlin/swift,arvedviehweger/swift,karwa/swift,devincoughlin/swift,hughbe/swift,danielmartin/swift,xwu/swift,arvedviehweger/swift,gribozavr/swift,jtbandes/swift,gmilos/swift,gmilos/swift,jtbandes/swift,jmgc/swift,manavgabhawala/swift,therealbnut/swift,parkera/swift,practicalswift/swift,deyton/swift,apple/swift,austinzheng/swift,tinysun212/swift-windows,huonw/swift,karwa/swift,JaSpa/swift,ben-ng/swift,return/swift,hughbe/swift,deyton/swift,stephentyrone/swift,sschiau/swift,austinzheng/swift,djwbrown/swift,rudkx/swift,aschwaighofer/swift,alblue/swift,benlangmuir/swift,arvedviehweger/swift,practicalswift/swift,jopamer/swift,tjw/swift,hughbe/swift,huonw/swift,manavgabhawala/swift,shajrawi/swift,huonw/swift,CodaFi/swift,allevato/swift,atrick/swift,JGiola/swift,brentdax/swift,Jnosh/swift,jtbandes/swift,Jnosh/swift,jopamer/swift,apple/swift,nathawes/swift,Jnosh/swift,zisko/swift,swiftix/swift,jtbandes/swift,shahmishal/swift,felix91gr/swift,roambotics/swift,benlangmuir/swift,hooman/swift,huonw/swift,therealbnut/swift,sschiau/swift,glessard/swift,alblue/swift,gribozavr/swift,jmgc/swift,CodaFi/swift,harlanhaskins/swift,xedin/swift,arvedviehweger/swift,airspeedswift/swift,return/swift,frootloops/swift,kstaring/swift,milseman/swift,jtbandes/swift,atrick/swift,Jnosh/swift,parkera/swift,ahoppen/swift,glessard/swift,devincoughlin/swift,felix91gr/swift,swiftix/swift,return/swift,harlanhaskins/swift,amraboelela/swift,tinysun212/swift-windows,allevato/swift,tkremenek/swift,JaSpa/swift,calebd/swift,devincoughlin/swift,karwa/swift,milseman/swift,tjw/swift,amraboelela/swift,roambotics/swift,jmgc/swift,swiftix/swift,rudkx/swift,therealbnut/swift,danielmartin/swift,gottesmm/swift,amraboelela/swift,lorentey/swift,manavgabhawala/swift,shajrawi/swift,djwbrown/swift,jckarter/swift,glessard/swift,JGiola/swift,return/swift,huonw/swift,tardieu/swift,gmilos/swift,hooman/swift,lorentey/swift,aschwaighofer/swift,hooman/swift,brentdax/swift,danielmartin/swift,bitjammer/swift,frootloops/swift,airspeedswift/swift,shajrawi/swift,jckarter/swift,therealbnut/swift,shahmishal/swift,swiftix/swift,ben-ng/swift,alblue/swift,apple/swift,codestergit/swift,zisko/swift,lorentey/swift,djwbrown/swift,swiftix/swift,bitjammer/swift,calebd/swift,jmgc/swift,therealbnut/swift,jopamer/swift,nathawes/swift,aschwaighofer/swift,alblue/swift,airspeedswift/swift,zisko/swift,parkera/swift,gottesmm/swift,uasys/swift,OscarSwanros/swift,tkremenek/swift,ben-ng/swift,gribozavr/swift,felix91gr/swift,gribozavr/swift,gregomni/swift,djwbrown/swift,ahoppen/swift,xedin/swift,OscarSwanros/swift,jtbandes/swift,amraboelela/swift,aschwaighofer/swift,lorentey/swift,karwa/swift,apple/swift,airspeedswift/swift,natecook1000/swift,JGiola/swift,zisko/swift,milseman/swift,therealbnut/swift,tkremenek/swift,sschiau/swift,harlanhaskins/swift,sschiau/swift,brentdax/swift,JaSpa/swift,calebd/swift,zisko/swift,rudkx/swift,nathawes/swift,hooman/swift,JGiola/swift,calebd/swift,deyton/swift,aschwaighofer/swift,parkera/swift,xedin/swift,apple/swift,practicalswift/swift,tardieu/swift,jopamer/swift,parkera/swift,OscarSwanros/swift,gribozavr/swift,tjw/swift,gregomni/swift,frootloops/swift,harlanhaskins/swift,ahoppen/swift,jckarter/swift,bitjammer/swift,xwu/swift,gmilos/swift,rudkx/swift,felix91gr/swift,glessard/swift,uasys/swift,calebd/swift,amraboelela/swift,CodaFi/swift,JaSpa/swift,frootloops/swift,shahmishal/swift,tardieu/swift,lorentey/swift,hughbe/swift,milseman/swift,parkera/swift,kstaring/swift,codestergit/swift,alblue/swift,milseman/swift,tkremenek/swift,gribozavr/swift,glessard/swift,danielmartin/swift,shajrawi/swift,Jnosh/swift,aschwaighofer/swift,brentdax/swift,frootloops/swift,sschiau/swift,danielmartin/swift,airspeedswift/swift,tkremenek/swift,felix91gr/swift,practicalswift/swift,gottesmm/swift,swiftix/swift,rudkx/swift,austinzheng/swift,xedin/swift,natecook1000/swift,practicalswift/swift,austinzheng/swift,natecook1000/swift,karwa/swift,JGiola/swift,apple/swift,xwu/swift,bitjammer/swift,brentdax/swift,aschwaighofer/swift,stephentyrone/swift,codestergit/swift,shahmishal/swift,tjw/swift,arvedviehweger/swift,danielmartin/swift,ahoppen/swift,rudkx/swift,milseman/swift,gottesmm/swift,brentdax/swift,harlanhaskins/swift,practicalswift/swift,shahmishal/swift,tinysun212/swift-windows,return/swift,Jnosh/swift,shajrawi/swift,OscarSwanros/swift,tinysun212/swift-windows