Minor improvements to handle caching and better handling of default spec provider behavior.