fix nm_query_type=messages + query type=threads

If the default query type is 'messages', and the specific query type is
'threads', make sure the query type is actually 'threads'.