Don't leak attrName to global scope

Thanks to `mocha` for reporting this to me :)