Fix caching when errors are discovered