Fixed #22826 -- Improved internal usage of Query.setup_joins.

This is a small PR that IMO is made of trivial changes in the guidelines for contributing sense; the commits are independent for reviewing.