Merge pull request #16172 from Agis-/hmt_scope_arity

has_many :through with dynamic condition merging
Conflicts:
	activerecord/CHANGELOG.md