Fixed QueryCache insert race condition