Belongs to nested models fix for missing foreign key

References #169