I'm of the opinion that variables should not be reappropriated. If you *really* want to avoid two extra property lookups per iteration, use `var parent_ = elem.parent` or similar. I wouldn't, though. I'd just use `elem.parent` in all three places:

```javascript
if (set.indexOf(elem.parent) < 0 && elem.parent.type !== 'root') {
  set.push(elem.parent);
}
```