Fixing search order, scoping, and property storage issues in the lookup method in the config class.