cubicweb #2410156 rql crash with yams inheritance and security [validation pending]

A normal user who performs this rql request "Any X WHERE X is_instance_of Executable" (cubicweb-processing revision 2e12caaf2364 with read permissions ['managers', ERQLExpression('X owned_by U')] on all entity types) gets following traceback

 File "/home/testing/simulagora/cubicweb/server/repository.py", line 764, in execute
   build_descr)
 File "/home/testing/simulagora/cubicweb/server/querier.py", line 733, in execute
   self._planner.build_plan(plan)
 File "/home/testing/simulagora/cubicweb/server/ssplanner.py", line 143, in build_plan
   for step in build_plan(plan, plan.rqlst):
 File "/home/testing/simulagora/cubicweb/server/ssplanner.py", line 152, in build_select_plan
   plan.preprocess(rqlst)
 File "/home/testing/simulagora/cubicweb/server/querier.py", line 260, in preprocess
   self._insert_security(union, noinvariant)
 File "/home/testing/simulagora/cubicweb/server/querier.py", line 364, in _insert_security
   self.rqlhelper.annotate(union)
 File "/home/testing/simulagora/rql/__init__.py", line 95, in annotate
   self._annotator.annotate(rqlst)
 File "/home/testing/simulagora/rql/stcheck.py", line 490, in annotate
   node.accept(self)
 File "/home/testing/simulagora/rql/utils.py", line 166, in accept
   return visit_method(self, *args, **kwargs)
 File "/home/testing/simulagora/rql/stcheck.py", line 512, in visit_union
   self.visit_select(select)
 File "/home/testing/simulagora/rql/stcheck.py", line 522, in visit_select
   self._visit_stmt(node)
 File "/home/testing/simulagora/rql/stcheck.py", line 506, in _visit_stmt
   node.where.accept(self, node)
 File "/home/testing/simulagora/rql/utils.py", line 166, in accept
   return visit_method(self, *args, **kwargs)
 File "/home/testing/simulagora/rql/stcheck.py", line 634, in visit_and
   node.children[0].accept(self, scope)
 File "/home/testing/simulagora/rql/utils.py", line 166, in accept
   return visit_method(self, *args, **kwargs)
 File "/home/testing/simulagora/rql/stcheck.py", line 634, in visit_and
   node.children[0].accept(self, scope)
 File "/home/testing/simulagora/rql/utils.py", line 166, in accept
   return visit_method(self, *args, **kwargs)
 File "/home/testing/simulagora/rql/stcheck.py", line 643, in visit_relation
   if relation.is_types_restriction():
 File "/home/testing/simulagora/rql/nodes.py", line 505, in is_types_restriction
   rhs = rhs.children[0]
IndexError: list index out of range
prioritynormal
typebug
done in3.15.2
load0.200
load left0.000
closed by#1ad42383a9ec [rql security] fix rql bug when using yams inheritance and read permissions (closes #2410156)