Is it safe to suppose this fct get called only on GroupDot? I don't think so in the old back-end, but I think it is safe in the old back-end. So just add if not isinstance(node.op, GroupDot): return False

idem for the other opt.