Set parent reference when adding a child