Ahh, I see, I got confused with the other one being defined and set inside an if else. We don't usually do var something inside an if else, so I didn't see it, and only otherwise saw one creation of the variable. That alone brought me to the conclusion that they must be shared, without checking scope.

Good call, fixing.