Fix use after free of Query.capture_names elements
PyList_GetItem returns a borrowed reference to the list element that
is then passed to PyTuple_Pack, which increments its reference count
and stores that reference in the tuple. Calling Py_XDECREF on the
reference therefore leaves the refcount one too low.