Fix undo not undoing parent additions
fixes #357
fixes #1931; fixes #1539
fixes #1930