diff --git a/src/plugins/debugger/qml/qmlinspectoragent.cpp b/src/plugins/debugger/qml/qmlinspectoragent.cpp
index ca399d46b0689b2d837997c9f49724e1bd360fc7..e9583d55c2d00c958b4918b892d4708354f75ec5 100644
--- a/src/plugins/debugger/qml/qmlinspectoragent.cpp
+++ b/src/plugins/debugger/qml/qmlinspectoragent.cpp
@@ -877,6 +877,7 @@ void QmlInspectorAgent::clearObjectTree()
     m_debugIdToIname.clear();
     m_debugIdChildIds.clear();
     m_objectStack.clear();
+    m_newObjectsCreated = false;
 
     removeAllObjectWatches();
 }