diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index 746bbb0f01d95cd3e3f06fc428a1d2ced7ce9b58..c926fbd90a17d1a58169b896aa832ab56d55fcb5 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -285,7 +285,7 @@ void CppComponentValue::processMembers(MemberProcessor *processor) const
     const QString &attachedTypeName = _metaObject->attachedTypeName();
     if (!attachedTypeName.isEmpty()) {
         const CppComponentValue *attachedType = valueOwner()->cppQmlTypes().objectByCppName(attachedTypeName);
-        if (attachedType)
+        if (attachedType && attachedType != this) // ### only weak protection against infinite loops
             attachedType->processMembers(processor);
     }