Set the inverse association before assigning attributes

Closes #9157