Patch for 2-3-stable. Fix infinite loop when using has_many :through with nonstandard keys

If you attempt the create a has_many :through association that uses a has_many association with nonstandard primary and foreign keys, you will get an infinite loop when trying to use the association. I have written a longer description of this problem, along with a simple, tested patch that fixes it in the following bug:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3628-infinite-loop-when-using-has_many-through-with-nonstandard-keys

Aubrey