[CXF-5802] Fix a condition introduced with the removeCache call where if two proxies are using the same cache, closing one (or having it GC'd) would cause the cache to become invalid.