internal void RemoveInstance(QueryInstance instance) => _instancesByKey.TryRemove(instance.Key, out _);
internal void Subscribe(QueryInstance instance) { _instancesByKey.TryAdd(instance.Key, instance); instance.Subscribe(this); }