Fixing two caching bugs, one with double invalidating, the other with metalists