improve peformance of direct locals access

Improve "invoke" method performance.