This test catches a segfault on a syntactically invalid query. It also catches a problem with my initial fix, which still returned 0.