Lookup functions: another fix for nested calls.