Merge pull request #14573 from habermann24/has_many_through_fix

Properly handle scoping with has_many :through. Fixes #14537.

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/cases/associations/has_many_through_associations_test.rb

Conflicts:
	activerecord/CHANGELOG.md