cubicweb #1518369 [rqlrewrite] key error on security check [deprecated]

Traceback (most recent call last)
 File "/home/auc/src/fcw/logilab/common/testlib.py", line 644, in _proceed
   testfunc(*args, **kwargs)
 File "/home/auc/src/fcw/cubes/pagode/test/test_security.py", line 186, in test_a_case_creation_and_tariff_plus_hourly
   tariff_rset = self.execute('Tariff T WHERE T name "spot", T in_tariff_box TB, TB name "default"')
 File "/home/auc/src/fcw/logilab/common/pytest.py", line 183, in not_covered
   return func(*args, **kwargs)
 File "/home/auc/src/fcw/cubicweb/devtools/testlib.py", line 395, in execute
   return req.execute(unicode(rql), args)
 File "/home/auc/src/fcw/cubicweb/dbapi.py", line 454, in execute
   build_descr=build_descr, **self._txid())
 File "/home/auc/src/fcw/cubicweb/server/repository.py", line 725, in execute
   build_descr)
 File "/home/auc/src/fcw/cubicweb/server/querier.py", line 707, in execute
   self._planner.build_plan(plan)
 File "/home/auc/src/fcw/cubicweb/server/ssplanner.py", line 273, in build_plan
   for step in build_plan(plan, plan.rqlst):
 File "/home/auc/src/fcw/cubicweb/server/ssplanner.py", line 282, in build_select_plan
   plan.preprocess(rqlst)
 File "/home/auc/src/fcw/cubicweb/server/querier.py", line 259, in preprocess
   self._insert_security(union, noinvariant)
 File "/home/auc/src/fcw/cubicweb/server/querier.py", line 357, in _insert_security
   rewrite(myrqlst, lcheckdef, lchecksolutions, self.args)
 File "/home/auc/src/fcw/cubicweb/rqlrewrite.py", line 176, in rewrite
   newsolutions = self.remove_ambiguities(snippets, newsolutions)
 File "/home/auc/src/fcw/cubicweb/rqlrewrite.py", line 392, in remove_ambiguities
   varname = self.rewritten[key]
KeyError: (ERQLExpression(Any X WHERE X rcase_for Z, Z require_permission P, P name IN ("operator", "modeller", "pfolio_manager"), U has_group_permission P, X eid %(x)s, U eid %(u)s), ('TB', 'X'), 'Z')
priorityimportant
typebug
done in3.13.6
load0.000
load left0.000
closed by<not specified>