Fix many_to_many eager load

has_and_belongs_to_many was not eager loading correct, as the design of
it was not account the FKs being in an array.

[fixes #3383]
[fixes #3495]