Handle local function calls differently from global calls.
Pre-lookup global functions.