MessageReceive on Query Fix.
Discard messages for queries which already exist in Database

A new thread is still created though. Should search for a better
optimization.