switching variable name in closure

Same, as [here](https://github.com/angular-ui/angular-ui/pull/569). Hope, this is right.