diff --git a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp
index dab142f85c83b6c1762a0400002d5bd07bda5968..f3928ee9c4e5383120880b0cfddbd2854841b0ed 100644
--- a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp
+++ b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp
@@ -240,12 +240,13 @@ protected:
                 type = SemanticHighlighter::ExternalIdType;
             } else if (scope == chain->rootObjectScope()) {
                 type = SemanticHighlighter::RootObjectPropertyType;
+            } else  { // check for this?
+                type = SemanticHighlighter::ExternalObjectPropertyType;
             }
-        } else { // check for this?
-            type = SemanticHighlighter::ExternalObjectPropertyType;
         }
 
-        addUse(location, type);
+        if (type != SemanticHighlighter::UnknownType)
+            addUse(location, type);
     }
 
     bool visit(UiObjectDefinition *ast)