It turns out recent changes make it possible for lcb_search to call the callback before returning an error. That segfaults our bindings, as the callback expects the us to already have released the gil. That is
CCBC-1428. So, once that is fixed lets use it, and remove the hack. See fts.c:57 – basically the conditional should go away, and we should always call PYCBC_CONN_THR_END (like all other callbacks).