diff --git a/src/plugins/cpptools/cpppreprocessor.cpp b/src/plugins/cpptools/cpppreprocessor.cpp
index 7bc50c5f9e93857b7fb015eb54b8117ccbd9b72e..e5c9c9dbd3cbccf2e68ecc468a2aeb6b6176f07a 100644
--- a/src/plugins/cpptools/cpppreprocessor.cpp
+++ b/src/plugins/cpptools/cpppreprocessor.cpp
@@ -201,8 +201,11 @@ bool CppPreprocessor::getFileContents(const QString &absoluteFilePath,
 
 bool CppPreprocessor::checkFile(const QString &absoluteFilePath) const
 {
-    if (absoluteFilePath.isEmpty() || m_included.contains(absoluteFilePath))
+    if (absoluteFilePath.isEmpty()
+            || m_included.contains(absoluteFilePath)
+            || m_workingCopy.contains(absoluteFilePath)) {
         return true;
+    }
 
     const QFileInfo fileInfo(absoluteFilePath);
     return fileInfo.isFile() && fileInfo.isReadable();