This looks racey, I think? If the var shows up first, and then the name, then both localVars and nonLocalVars will have an entry for that variable. And the order can be either way (use can precede var).

Instead, how about removing the line here with `delete`, and renaming `nonLocalVars` to allVars`, and then in the assertion later down, check if the minified name is in names, then it must also be in localVars?