The parentedMixin doesn't automatically set the parent, so when this mixin is used, the parent must be set manually. This wasn't done at several places, and thus those elements weren't destroyed with their actual parent. In master, we should probably make the ParentedMixin set the parent itself.