Use proper instance of Relation

Bugfix from @anlutro's recent PR #2734