Revert "resolve variable to type when looking up scope"

This reverts commit af4247def74d4e1f034d00732c0b5e921056a45b.
really resolve variable to type when looking up scope