cubicweb #231354 related_entity fails wrt subqueries [resolved]

example rql:

DISTINCT Any VF, VCD, D ORDERBY VCD DESC WHERE
  VC in_state S, S name %(state)s, VC owned_by U, U eid %(u)s,
  VC content_metadata M, M date D
  WITH VF, VC, VCD BEING (Any VF, MAX(VC), VCD GROUPBY VF, VCD
                          WHERE VC content_for VF, VC creation_date VCD)
priorityimportant
typebug
done in3.4.5
load1.000
load left0.000
closed by<not specified>