Fix crash when query is evicted from QueryCache
The eviction code was bugged and caused unrelated entries to be evicted from m_keys and m_queries. This lead to m_keys holding an invalid iterator to m_queries, resulting in a crash.
BUG: 492547 FIXED-IN: 24.08.1