Fix duplicate nick/quit messages in queries