improved handling of locals in kernelc
improved map lookup resolution