Fix undefined handling for pathed lookups