Fixes #199

Fixes #199 by adding the through-table's foreign key to the related model's data, then uses that to compare the association. Requires no storage of the intermediate models.