diff --git a/HScope.hs b/HScope.hs
--- a/HScope.hs
+++ b/HScope.hs
@@ -117,7 +117,7 @@
     go t ('#':str) = let ((xs, _), res) = ret t in ((xs, isInfixOf f str), res)
     go t _ = ret t
     ret ((a@(x:xs), b), res) = ((if b then xs else a, b), x:res)
-    ret t = t
+    ret (([], _), res) = (([], False), (head res):res)
 
 preprocess :: [String] -> FilePath -> IO (String, Lines)
 preprocess idirs f = do
diff --git a/hscope.cabal b/hscope.cabal
--- a/hscope.cabal
+++ b/hscope.cabal
@@ -1,5 +1,5 @@
 Name:           hscope
-Version:        0.2.1
+Version:        0.2.2
 License:        BSD3
 License-File:   COPYING
 Category:       source-tools
diff --git a/t/Build.hs b/t/Build.hs
--- a/t/Build.hs
+++ b/t/Build.hs
@@ -23,7 +23,7 @@
 
 main :: IO ()
 main = withTemporaryDirectory "/tmp/hscope_test_XXXXXX" $ \td -> testSimpleMain $ do
-    plan 47
+    plan 48
     hpath <- liftIO $ canonicalizePath "./dist/build/hscope/hscope"
     tfile <- liftIO $ canonicalizePath "./t/files/Simple.hs"
     ec1 <- liftIO $ system $ "cd " ++ td ++ " && " ++ hpath ++ " -b " ++ tfile
@@ -144,5 +144,10 @@
     res21 <- liftIO $ readProcess hpath [ "--build", "-f", td ++ "/foo.out"
                             , "t/files/Setup.lhs" ] ""
     is res21 $ ""
+
+    res22 <- liftIO $ readProcess hpath [ "-b", "-f", td ++ "/foo.out"
+                                    , "-I", "t/files/a", "-I", "t/files/b"
+                                    , "t/files/CPP3.hs" ] ""
+    is res22 ""
 
     return ()
