Only do scope.lookupvar once

Improving some efficiency