fix #2542: NPE when deleting list with all caches in it