text: Title: contains eager with many levels illustrated not pathing correctly
  Body: ### Discussed in https://github.com/sqlalchemy/sqlalchemy/discussions/10003
  
  test cases should includ single inh as well as joined inh, use assorted_eager
  
  
  ```py
  from sqlalchemy import and_
  from sqlalchemy import Column
  from sqlalchemy import create_engine
  from sqlalchemy import ForeignKey
  from sqlalchemy import Integer, insert
  from sqlalchemy import select
  from sqlalchemy import Table
  from sqlalchemy.ext.hybrid import hybrid_property
  from sqlalchemy.orm import aliased
  from sqlalchemy.orm import DeclarativeBase
  from sqlalchemy.orm import joinedload
  from sqlalchemy.orm import Mapped
  from sqlalchemy.orm import mapped_column
  from sqlalchemy.orm import relationship
  from sqlalchemy.orm import sessionmaker
  from sqlalchemy.orm import with_polymorphic, contains_eager
  
  
  class Base(DeclarativeBase):
      pass
  
  
  EmplLinks = Table(
      "employee_m2m",
      Base.metadata,
      Column("id", Integer, primary_key=True),
      Column(
          "type", Integer
      ),  # 1 - head to manager, 2 - manager to employees, 3 - colleague, 4 - parent to child
      Column("left", Integer, ForeignKey("employee.id")),
      Column("right", Integer, ForeignKey("employee.id")),
  )
  
  
  class Property(Base):
      __tablename__ = "property"
      id: Mapped[int] = mapped_column(primary_key=True)
      key: Mapped[str] = mapped_column(name="key")
      value: Mapped[str] = mapped_column(name="value")
  
      user_id: Mapped[int] = mapped_column(ForeignKey("employee.id"))
  
  
  class Employee(Base):
      __tablename__ = "employee"
      id: Mapped[int] = mapped_column(primary_key=True)
      name: Mapped[str]
      type: Mapped[str]
      prop1 = relationship(
          Property,
          primaryjoin="and_(Property.user_id == Employee.id, "
          "Property.key=='key1')",
          uselist=False,
          viewonly=True,
          lazy="raise",
      )
  
      @classmethod
      def __declare_last__(cls):
          j = aliased(EmplLinks)
  
          cls.colleagues = relationship(
              cls,
              secondary=j,
              primaryjoin=cls.id == j.c.left,
              secondaryjoin=and_(
                  cls.id == j.c.right, j.c.type.in_([1, 2, 3, 4])
              ),
              foreign_keys=[j.c.left, j.c.right],
              join_depth=0,
              viewonly=True,
              uselist=True,
              lazy="raise",
          )
  
      @hybrid_property
      def prop1_value(self):
          return self.prop1.value
  
      @prop1_value.expression
      def prop1_value(cls):
          return Property.value
  
      @classmethod
      def prop1_value_of_type(cls, type_):
          return type_.value
  
      __mapper_args__ = {
          "polymorphic_on": "type",
          "polymorphic_identity": "employee",
      }
  
  
  class Manager(Employee):
      __mapper_args__ = {
          "polymorphic_identity": "manager",
      }
  
  
  class Engineer(Employee):
      __mapper_args__ = {
          "polymorphic_identity": "engineer",
      }
  
  
  class Clerk(Employee):
      __mapper_args__ = {
          "polymorphic_identity": "clerk",
      }
  
  
  class UnitHead(Employee):
      managers = relationship(
          "Manager",
          secondary=EmplLinks,
          primaryjoin=and_(
              Employee.id == EmplLinks.c.left, EmplLinks.c.type == 4
          ),
          secondaryjoin=and_(
              Manager.id == EmplLinks.c.right, Manager.type == "manager"
          ),
          foreign_keys=[EmplLinks.c.left, EmplLinks.c.right],
          join_depth=0,
          viewonly=True,
          uselist=True,
          lazy="raise",
      )
      __mapper_args__ = {
          "polymorphic_identity": "unithead",
      }
  
  
  # data
  engine = create_engine("sqlite://", echo="debug")
  session = sessionmaker(autocommit=False, autoflush=False, bind=engine)()
  Base.metadata.create_all(engine)
  
  unithead = UnitHead(type="unithead", name="unithead1")
  
  manager = Manager(type="manager", name="manager1")
  engineer = Engineer(type="engineer", name="engineer1")
  clerk = Clerk(type="clerk", name="clerk1")
  
  manager2 = Manager(type="manager", name="manager2")
  engineer3 = Engineer(type="engineer", name="engineer3")
  
  
  session.add_all([unithead, manager, engineer, clerk, manager2, engineer3])
  session.commit()
  session.flush()
  
  #
  session.execute(
      insert(EmplLinks).values(type=4, left=unithead.id, right=manager.id)
  )
  session.execute(
      insert(EmplLinks).values(type=4, left=manager.id, right=engineer.id)
  )
  session.execute(
      insert(EmplLinks).values(type=4, left=manager.id, right=clerk.id)
  )
  
  #
  prop = Property(key="key1", value="val engineer", user_id=engineer.id)
  prop2 = Property(key="key1", value="val clerk", user_id=clerk.id)
  prop3 = Property(key="key1", value="val manager", user_id=manager.id)
  prop4 = Property(key="key1", value="val unithead", user_id=unithead.id)
  session.add_all([prop, prop2, prop3, prop4])
  session.commit()
  session.flush()
  
  # query
  
  mgr = aliased(Manager)
  clg = aliased(Employee)
  clgs_prop1 = aliased(Property, name="clgs_prop1")
  
  # would ideally include
  # ma_prop1 = aliased(Property)
  # uhead_prop1 = aliased(Property)
  
  query = (
      select(UnitHead)
      .options(
          contains_eager(UnitHead.managers.of_type(mgr))
          .contains_eager(mgr.colleagues.of_type(clg))
          .contains_eager(clg.prop1.of_type(clgs_prop1)),
      )
      .outerjoin(UnitHead.managers.of_type(mgr))
      .outerjoin(mgr.colleagues.of_type(clg))
      .outerjoin(clg.prop1.of_type(clgs_prop1))
  
      # would ideally include
    # .outerjoin(UnitHead.prop1.of_type(uhead_prop1))
     #.outerjoin(mgr.prop1.of_type(ma_prop1))
     #.where(
     #    UnitHead.prop1_value_of_type(uhead_prop1) == "val unithead",
     #     mgr.prop1_value_of_type(ma_prop1) == "val manager",
     #     clg.prop1_value_of_type(clgs_prop1) == "val engineer",
   #)
  
  )
  
  
  result = session.scalars(query).unique()
  head = result.one()
  print(head.managers[0].colleagues)
  print(head.managers[0].colleagues[0].prop1)
  
  ```
  
  the contains_eager() fails to add the clg_prop1 columns:
  
  ```
  SELECT employee_1.id, employee_1.name, employee_1.type, employee_2.id AS id_1, employee_2.name AS name_1, employee_2.type AS type_1, employee_3.id AS id_2, employee_3.name AS name_2, employee_3.type AS type_2 
  FROM employee AS employee_3 LEFT OUTER JOIN (employee_m2m AS employee_m2m_1 JOIN employee AS employee_1 ON employee_1.id = employee_m2m_1."right" AND employee_1.type = ? AND employee_1.type IN (?)) ON employee_3.id = employee_m2m_1."left" AND employee_m2m_1.type = ? LEFT OUTER JOIN (employee_m2m AS anon_1 JOIN employee AS employee_2 ON employee_2.id = anon_1."right" AND anon_1.type IN (?, ?, ?, ?)) ON employee_1.id = anon_1."left" LEFT OUTER JOIN property AS clgs_prop1 ON clgs_prop1.user_id = employee_2.id AND clgs_prop1."key" = ? 
  WHERE employee_3.type IN (?)
  
  ```