fixes an issue with has_many_through and polymorphic associations when source option is used.