nine: query9, improve QUERY handling

This fix wine tests segfault.

Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>