Work around errors in cache stuff.
Merge branch '4.0'