fix the data race found in bug #1574632.
fix the data race found in bug #1574632.

We were creating a variable and observing it in the original goroutine,
while mutating that variable in another goroutine.
The second goroutine needs to mutate it to avoid closing a channel twice,
so we need a different variable to observe that the channel is closed.

howbazaar/juju,mikemccracken/juju,waigani/juju,AdamIsrael/juju,bz2/juju,perrito666/juju,waigani/juju,frankban/juju,perrito666/juju,dooferlad/juju,perrito666/juju,kat-co/juju,mikemccracken/juju,marcmolla/juju,axw/juju,alesstimec/juju,macgreagoir/juju,axw/juju,marcmolla/juju,frankban/juju,waigani/juju,alesstimec/juju,axw/juju,ericsnowcurrently/juju,AdamIsrael/juju,dooferlad/juju,bz2/juju,bogdanteleaga/juju,reedobrien/juju,kat-co/juju,waigani/juju,perrito666/juju,reedobrien/juju,alesstimec/juju,dimitern/juju,dimitern/juju,frankban/juju,marcmolla/juju,bogdanteleaga/juju,mjs/juju,kat-co/juju,AdamIsrael/juju,ericsnowcurrently/juju,mjs/juju,bogdanteleaga/juju,bac/juju,marcmolla/juju,alesstimec/juju,mjs/juju,bz2/juju,mjs/juju,AdamIsrael/juju,mikemccracken/juju,mikemccracken/juju,mikemccracken/juju,howbazaar/juju,reedobrien/juju,macgreagoir/juju,gabriel-samfira/juju,macgreagoir/juju,bz2/juju,ericsnowcurrently/juju,anastasiamac/juju,marcmolla/juju,mjs/juju,anastasiamac/juju,macgreagoir/juju,anastasiamac/juju,bac/juju,reedobrien/juju,dimitern/juju,bac/juju,bogdanteleaga/juju,frankban/juju,bz2/juju,ericsnowcurrently/juju,gabriel-samfira/juju,anastasiamac/juju,mjs/juju,axw/juju,dimitern/juju,gabriel-samfira/juju,reedobrien/juju,bac/juju,ericsnowcurrently/juju,alesstimec/juju,howbazaar/juju,frankban/juju,dooferlad/juju,mjs/juju,howbazaar/juju,gabriel-samfira/juju,bac/juju,perrito666/juju,gabriel-samfira/juju,kat-co/juju,howbazaar/juju,axw/juju,dimitern/juju,dooferlad/juju,kat-co/juju,macgreagoir/juju,anastasiamac/juju,dooferlad/juju