Fix to hopefully not flood providers for queries which cannot be serviced.
Threading fix (when thread already exists for query number.)