Add failing test case for #16128
Pass the argument in has_many through relation

Fixes #16128

This bug was introduced in https://github.com/rails/rails/commit/c35e438620f2d56562251571377995359546393d
so it's present from 4.1.2-rc1 and after.

https://github.com/rails/rails/commit/c35e438620f2d56562251571377995359546393d merges any relation
scopes passed as proc objects to the relation, but does *not* take into account the case where
the lambda requires an argument (ie. the current record).

To reproduce see https://gist.github.com/Agis-/5f1f0d664d2cd08dfb9b