Fix memory leak in query_captures
PyList_Append increments the reference count so we must decref the appended object to avoid a memory leak.