Compiler: improvements to method lookup caching