Fixes #1791: joinWithRelation using table alias.