fix preloading of st models on has_many through associations

This patch fixes #11078 by removing the type conditions from `through_scope`.
It is really inspired by #11082 and the comment from @neerajdotname.