3.2.12 More inclusive fix for regression in joins

This patch fixes an issue that #9262 did not solve for us.

In particular, it didn't resolve the case when not using an SQL table alias, but an Arel::TableAlias is present. See test case for an example.

(Addresses #9257, #9260.)