Make sure the object gets destroyed before the view
Otherwise it gets confused, especially if the view itself is passed as either a context property or property value. It doesn't make sense anyway that QML views need to take into account that their view has disappeared.