Crash during ciao_query_begin_term(), from C