RelationEditor: fix returning the wrong variable in getRelation