BUG: Bug in internal caching, related to (GH5727)