diff --git a/bin/util/common.py b/bin/util/common.py
index 335a776d0508f2fcd3dae74f1c4bc61d5462a652..62af82d281f9bde7c374a8e42fb989cc16f6c7ac 100644
--- a/bin/util/common.py
+++ b/bin/util/common.py
@@ -198,9 +198,9 @@ def queryYesNo(question, default="yes"):
 def cppHeaderFilter():
     """
     Filter out source files that are not headers
-    (sources are determined by looking for config.h)
+    (consider everything except for config.h)
     """
-    return lambda fileName: fileName == "config.h"
+    return lambda fileName: fileName != "config.h"
 
 
 def includedCppProjectHeaders(file, projectBase, headers=None, headerFilter=cppHeaderFilter()):
@@ -219,7 +219,7 @@ def includedCppProjectHeaders(file, projectBase, headers=None, headerFilter=cppH
         def process(pathInProject):
             headerPath = os.path.join(projectBase, pathInProject)
             if os.path.exists(headerPath):
-                if not headerFilter(pathInProject):
+                if headerFilter(pathInProject):
                     if headerPath not in headers:
                         headers.append(headerPath)
                         includedCppProjectHeaders(headerPath, projectBase, headers, headerFilter)