Properly handle scoping with has_many :through. Fixes #14537.
Add a CHANGELOG entry for the has_many :through scoping fix (See #14537 for details).
Simplify the code in target_scope
Minor improvement: Use the merge method on the relation instead of instance_eval directly.
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