diff --git a/cabal-helper.cabal b/cabal-helper.cabal
--- a/cabal-helper.cabal
+++ b/cabal-helper.cabal
@@ -1,5 +1,5 @@
 name:                cabal-helper
-version:             0.8.0.0
+version:             0.8.0.1
 synopsis:
  Simple interface to some of Cabal's configuration state, mainly used by ghc-mod
 description:
diff --git a/src/CabalHelper/Runtime/Main.hs b/src/CabalHelper/Runtime/Main.hs
--- a/src/CabalHelper/Runtime/Main.hs
+++ b/src/CabalHelper/Runtime/Main.hs
@@ -760,13 +760,7 @@
 #endif
 componentEntrypoints (CExe Executable {..})
     = ChExeEntrypoint
-#if CH_MIN_VERSION_Cabal(2,0,0)
-        --
-        ( head ((hsSourceDirs buildInfo) ++ ["."]) </> modulePath)
-        -- modulePath
-#else
         modulePath
-#endif
         (map gmModuleName $ otherModules buildInfo)
 componentEntrypoints (CTest TestSuite { testInterface = TestSuiteExeV10 _ fp, ..})
     = ChExeEntrypoint fp (map gmModuleName $ otherModules testBuildInfo)
diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs
--- a/tests/GhcSession.hs
+++ b/tests/GhcSession.hs
@@ -144,8 +144,20 @@
     ts <- mapM (\t -> guessTarget t Nothing) $
          case ep of
            ChLibEntrypoint ms ms' ss -> map unChModuleName $ ms ++ ms' ++ ss
-           ChExeEntrypoint m  ms     -> [m] ++ map unChModuleName ms
+           ChExeEntrypoint m'  ms    ->
+             let
+
+               -- The options first clear out includes, then put in the build dir. We want the
+               -- first one after that, so "regex-example" in the following case
+               --
+               -- ,"-i"
+               -- ,"-idist/build/regex-example"
+               -- ,"-iregex-example"
+               firstInclude = drop 2 $ head $ drop 2 $ filter (isPrefixOf "-i") opts
+               m = firstInclude </> m'
+             in [m] ++ map unChModuleName ms
            ChSetupEntrypoint         -> ["Setup.hs"]
+
     let ts' = case nb of
                 NoBuildOutput -> map (\t -> t { targetAllowObjCode = False }) ts
                 ProduceBuildOutput -> ts
diff --git a/tests/UnitTests.hs b/tests/UnitTests.hs
new file mode 100644
--- /dev/null
+++ b/tests/UnitTests.hs
@@ -0,0 +1,26 @@
+import Test.Tasty
+import Test.Tasty.HUnit
+import Test.Tasty.SmallCheck
+
+import Data.List
+
+main :: IO ()
+main = defaultMain $
+  testGroup "Tests"
+    [ testGroup "(checked by SmallCheck)"
+        [ testProperty "sort == sort . reverse" $
+            \list -> sort (list :: [Int]) == sort (reverse list)
+
+        , testProperty "Fermat's last theorem" $
+            \x y z n -> (n :: Integer) >= 3 ==>
+              x^n + y^n /= (z^n :: Integer)
+        ]
+
+    , testGroup "Unit tests"
+        [ testCase "List comparison (different length)" $
+            [1, 2, 3] `compare` [1,2] @?= GT
+
+        , testCase "List comparison (same length)" $
+            [1, 2, 3] `compare` [1,2,2] @?= LT
+        ]
+    ]
