Fix bug where object's parent wasn't set correctly with parent_

fixes #1961