Fixed #1202: Failed assertion in connection_cache.hpp