Implement lookup of locals