It's not entirely clear why specifying the foreign key explicitly fixes this - the value given is what it should default to - but without this it finds the child relation instead when looking at the parents of a relation. Fixes #789