Add a failing test for #14537: Unexpected behavior for has_many :through associations that go through a has_many that resets the default scope using the unscope() method.

Merge the reflection scope in the target_scope of a through association. Fixes #14537.

Properly handle scoping with has_many :through. Fixes #14537.
Merge branch 'master' of https://github.com/habermann24/rails