Exclude local columns when adapting secondary in a join condition
Fixed ORM bug where a "secondary" table that referred to a selectable which
in some way would refer to the local primary table would apply aliasing to
both sides of the join condition when a relationship-related join, either
via :meth:`.Query.join` or by :func:`.joinedload`, were generated. The
"local" side is now excluded.
Fixes: #4974
Change-Id: Ia43da747c22141b05439f4511ddeceb10248582e
(cherry picked from commit
f3bfe0881726f1b3075400346f5987390ebe6c19)