Bug 951: Lock the cache entry while the hook runs.