Fix an iterator invalidation bug. :boom:
Fix an iterator invalidation bug. :boom:

Found with Valgrind. rdar://23303031.

karwa/swift,tkremenek/swift,codestergit/swift,CodaFi/swift,ken0nek/swift,tkremenek/swift,kusl/swift,tinysun212/swift-windows,rudkx/swift,Jnosh/swift,jtbandes/swift,tjw/swift,return/swift,manavgabhawala/swift,modocache/swift,benlangmuir/swift,modocache/swift,apple/swift,amraboelela/swift,johnno1962d/swift,sschiau/swift,slavapestov/swift,huonw/swift,kperryua/swift,russbishop/swift,Jnosh/swift,gmilos/swift,arvedviehweger/swift,JaSpa/swift,adrfer/swift,ben-ng/swift,benlangmuir/swift,Ivacker/swift,OscarSwanros/swift,LeoShimonaka/swift,sdulal/swift,IngmarStein/swift,gottesmm/swift,airspeedswift/swift,airspeedswift/swift,jmgc/swift,devincoughlin/swift,aschwaighofer/swift,tardieu/swift,roambotics/swift,gribozavr/swift,Ivacker/swift,mightydeveloper/swift,codestergit/swift,sdulal/swift,Jnosh/swift,apple/swift,kperryua/swift,xedin/swift,brentdax/swift,johnno1962d/swift,rudkx/swift,calebd/swift,milseman/swift,alblue/swift,lorentey/swift,manavgabhawala/swift,calebd/swift,jckarter/swift,gribozavr/swift,sdulal/swift,atrick/swift,ken0nek/swift,SwiftAndroid/swift,sschiau/swift,ken0nek/swift,uasys/swift,gribozavr/swift,ben-ng/swift,huonw/swift,khizkhiz/swift,tjw/swift,sdulal/swift,MukeshKumarS/Swift,LeoShimonaka/swift,swiftix/swift.old,shahmishal/swift,glessard/swift,therealbnut/swift,gregomni/swift,Jnosh/swift,khizkhiz/swift,emilstahl/swift,shajrawi/swift,russbishop/swift,cbrentharris/swift,zisko/swift,milseman/swift,kstaring/swift,apple/swift,karwa/swift,kstaring/swift,adrfer/swift,JGiola/swift,glessard/swift,rudkx/swift,harlanhaskins/swift,devincoughlin/swift,xedin/swift,modocache/swift,CodaFi/swift,hughbe/swift,austinzheng/swift,OscarSwanros/swift,lorentey/swift,benlangmuir/swift,hughbe/swift,OscarSwanros/swift,codestergit/swift,cbrentharris/swift,parkera/swift,dduan/swift,ben-ng/swift,ken0nek/swift,ahoppen/swift,atrick/swift,shajrawi/swift,tjw/swift,devincoughlin/swift,bitjammer/swift,djwbrown/swift,jtbandes/swift,tjw/swift,kstaring/swift,allevato/swift,mightydeveloper/swift,gmilos/swift,bitjammer/swift,johnno1962d/swift,kstaring/swift,huonw/swift,therealbnut/swift,Ivacker/swift,KrishMunot/swift,MukeshKumarS/Swift,gribozavr/swift,hooman/swift,russbishop/swift,tardieu/swift,tkremenek/swift,sdulal/swift,kentya6/swift,arvedviehweger/swift,gregomni/swift,adrfer/swift,xwu/swift,shajrawi/swift,apple/swift,return/swift,SwiftAndroid/swift,hooman/swift,deyton/swift,milseman/swift,jmgc/swift,adrfer/swift,return/swift,dduan/swift,djwbrown/swift,shahmishal/swift,hooman/swift,sschiau/swift,cbrentharris/swift,xedin/swift,danielmartin/swift,xwu/swift,KrishMunot/swift,ahoppen/swift,dduan/swift,parkera/swift,kusl/swift,harlanhaskins/swift,gribozavr/swift,adrfer/swift,milseman/swift,felix91gr/swift,swiftix/swift,xwu/swift,karwa/swift,xwu/swift,gottesmm/swift,brentdax/swift,swiftix/swift.old,devincoughlin/swift,arvedviehweger/swift,JaSpa/swift,djwbrown/swift,benlangmuir/swift,sschiau/swift,hughbe/swift,milseman/swift,mightydeveloper/swift,atrick/swift,austinzheng/swift,hughbe/swift,OscarSwanros/swift,gregomni/swift,dreamsxin/swift,deyton/swift,parkera/swift,tkremenek/swift,natecook1000/swift,karwa/swift,frootloops/swift,nathawes/swift,manavgabhawala/swift,LeoShimonaka/swift,allevato/swift,parkera/swift,calebd/swift,lorentey/swift,shahmishal/swift,CodaFi/swift,rudkx/swift,MukeshKumarS/Swift,kusl/swift,jmgc/swift,modocache/swift,mightydeveloper/swift,ben-ng/swift,arvedviehweger/swift,djwbrown/swift,glessard/swift,atrick/swift,codestergit/swift,gribozavr/swift,austinzheng/swift,LeoShimonaka/swift,Jnosh/swift,MukeshKumarS/Swift,brentdax/swift,zisko/swift,cbrentharris/swift,MukeshKumarS/Swift,devincoughlin/swift,dreamsxin/swift,milseman/swift,adrfer/swift,IngmarStein/swift,Ivacker/swift,therealbnut/swift,gmilos/swift,natecook1000/swift,jckarter/swift,felix91gr/swift,djwbrown/swift,shajrawi/swift,karwa/swift,zisko/swift,JaSpa/swift,alblue/swift,codestergit/swift,jopamer/swift,apple/swift,cbrentharris/swift,IngmarStein/swift,LeoShimonaka/swift,deyton/swift,stephentyrone/swift,kperryua/swift,swiftix/swift,jtbandes/swift,Ivacker/swift,jopamer/swift,jopamer/swift,ahoppen/swift,frootloops/swift,gregomni/swift,tinysun212/swift-windows,karwa/swift,return/swift,manavgabhawala/swift,emilstahl/swift,tinysun212/swift-windows,practicalswift/swift,practicalswift/swift,stephentyrone/swift,swiftix/swift.old,amraboelela/swift,gregomni/swift,IngmarStein/swift,brentdax/swift,natecook1000/swift,austinzheng/swift,aschwaighofer/swift,kstaring/swift,swiftix/swift,alblue/swift,sschiau/swift,tkremenek/swift,amraboelela/swift,mightydeveloper/swift,airspeedswift/swift,uasys/swift,gottesmm/swift,xedin/swift,kusl/swift,johnno1962d/swift,xwu/swift,hughbe/swift,kentya6/swift,karwa/swift,tardieu/swift,gottesmm/swift,huonw/swift,tinysun212/swift-windows,gmilos/swift,JaSpa/swift,swiftix/swift.old,lorentey/swift,MukeshKumarS/Swift,aschwaighofer/swift,LeoShimonaka/swift,slavapestov/swift,Jnosh/swift,frootloops/swift,lorentey/swift,glessard/swift,therealbnut/swift,stephentyrone/swift,russbishop/swift,danielmartin/swift,emilstahl/swift,OscarSwanros/swift,johnno1962d/swift,IngmarStein/swift,brentdax/swift,shahmishal/swift,modocache/swift,felix91gr/swift,OscarSwanros/swift,therealbnut/swift,airspeedswift/swift,therealbnut/swift,JaSpa/swift,swiftix/swift,roambotics/swift,russbishop/swift,shajrawi/swift,aschwaighofer/swift,atrick/swift,CodaFi/swift,emilstahl/swift,benlangmuir/swift,jtbandes/swift,practicalswift/swift,bitjammer/swift,Ivacker/swift,xedin/swift,allevato/swift,practicalswift/swift,xedin/swift,stephentyrone/swift,CodaFi/swift,djwbrown/swift,jtbandes/swift,natecook1000/swift,swiftix/swift.old,russbishop/swift,gottesmm/swift,sschiau/swift,apple/swift,roambotics/swift,nathawes/swift,mightydeveloper/swift,swiftix/swift.old,tinysun212/swift-windows,parkera/swift,austinzheng/swift,zisko/swift,return/swift,felix91gr/swift,Ivacker/swift,jopamer/swift,deyton/swift,russbishop/swift,mightydeveloper/swift,bitjammer/swift,amraboelela/swift,dduan/swift,nathawes/swift,harlanhaskins/swift,natecook1000/swift,natecook1000/swift,lorentey/swift,Jnosh/swift,tardieu/swift,emilstahl/swift,allevato/swift,arvedviehweger/swift,gregomni/swift,glessard/swift,slavapestov/swift,JGiola/swift,kusl/swift,frootloops/swift,airspeedswift/swift,deyton/swift,uasys/swift,benlangmuir/swift,ben-ng/swift,harlanhaskins/swift,hughbe/swift,ben-ng/swift,slavapestov/swift,jopamer/swift,ahoppen/swift,calebd/swift,brentdax/swift,xwu/swift,xedin/swift,return/swift,dduan/swift,parkera/swift,shahmishal/swift,roambotics/swift,practicalswift/swift,lorentey/swift,codestergit/swift,uasys/swift,nathawes/swift,frootloops/swift,SwiftAndroid/swift,tardieu/swift,huonw/swift,atrick/swift,kentya6/swift,amraboelela/swift,manavgabhawala/swift,OscarSwanros/swift,gmilos/swift,kentya6/swift,danielmartin/swift,deyton/swift,modocache/swift,jmgc/swift,aschwaighofer/swift,kperryua/swift,sschiau/swift,swiftix/swift,shajrawi/swift,CodaFi/swift,SwiftAndroid/swift,harlanhaskins/swift,JGiola/swift,swiftix/swift.old,manavgabhawala/swift,huonw/swift,JGiola/swift,cbrentharris/swift,huonw/swift,allevato/swift,danielmartin/swift,tjw/swift,ahoppen/swift,felix91gr/swift,KrishMunot/swift,tjw/swift,jckarter/swift,khizkhiz/swift,jckarter/swift,jmgc/swift,SwiftAndroid/swift,tjw/swift,Ivacker/swift,kperryua/swift,sdulal/swift,allevato/swift,shahmishal/swift,kentya6/swift,KrishMunot/swift,brentdax/swift,gribozavr/swift,jckarter/swift,roambotics/swift,jckarter/swift,nathawes/swift,uasys/swift,kusl/swift,stephentyrone/swift,JaSpa/swift,ben-ng/swift,gottesmm/swift,natecook1000/swift,aschwaighofer/swift,practicalswift/swift,KrishMunot/swift,gmilos/swift,felix91gr/swift,kusl/swift,slavapestov/swift,slavapestov/swift,tardieu/swift,alblue/swift,hooman/swift,allevato/swift,xwu/swift,uasys/swift,CodaFi/swift,rudkx/swift,JaSpa/swift,nathawes/swift,danielmartin/swift,hughbe/swift,dduan/swift,kstaring/swift,slavapestov/swift,modocache/swift,emilstahl/swift,zisko/swift,tinysun212/swift-windows,swiftix/swift,practicalswift/swift,harlanhaskins/swift,shajrawi/swift,alblue/swift,tkremenek/swift,tardieu/swift,roambotics/swift,frootloops/swift,IngmarStein/swift,frootloops/swift,emilstahl/swift,arvedviehweger/swift,danielmartin/swift,nathawes/swift,ken0nek/swift,ahoppen/swift,khizkhiz/swift,hooman/swift,ken0nek/swift,parkera/swift,jmgc/swift,xedin/swift,devincoughlin/swift,swiftix/swift,rudkx/swift,jtbandes/swift,kusl/swift,stephentyrone/swift,codestergit/swift,JGiola/swift,johnno1962d/swift,stephentyrone/swift,kentya6/swift,KrishMunot/swift,aschwaighofer/swift,milseman/swift,bitjammer/swift,glessard/swift,tinysun212/swift-windows,kperryua/swift,harlanhaskins/swift,parkera/swift,hooman/swift,amraboelela/swift,sschiau/swift,gmilos/swift,jopamer/swift,practicalswift/swift,cbrentharris/swift,danielmartin/swift,mightydeveloper/swift,calebd/swift,JGiola/swift,lorentey/swift,shahmishal/swift,deyton/swift,swiftix/swift.old,devincoughlin/swift,gottesmm/swift,khizkhiz/swift,kstaring/swift,SwiftAndroid/swift,jopamer/swift,jtbandes/swift,bitjammer/swift,emilstahl/swift,johnno1962d/swift,uasys/swift,MukeshKumarS/Swift,jckarter/swift,return/swift,calebd/swift,sdulal/swift,kentya6/swift,khizkhiz/swift,tkremenek/swift,amraboelela/swift,LeoShimonaka/swift,austinzheng/swift,kentya6/swift,zisko/swift,IngmarStein/swift,khizkhiz/swift,hooman/swift,SwiftAndroid/swift,adrfer/swift,arvedviehweger/swift,felix91gr/swift,calebd/swift,dduan/swift,therealbnut/swift,cbrentharris/swift,ken0nek/swift,sdulal/swift,kperryua/swift,alblue/swift,bitjammer/swift,austinzheng/swift,jmgc/swift,gribozavr/swift,shahmishal/swift,shajrawi/swift,zisko/swift,alblue/swift,djwbrown/swift,airspeedswift/swift,KrishMunot/swift,karwa/swift,LeoShimonaka/swift,manavgabhawala/swift,airspeedswift/swift,devincoughlin/swift