Patches tcpreceiver.cc to change the order in which queries are handled.