failing test for #68
Fix for issue 68: relationship references wrong table

Include @suxxes changes