diff --git a/example/hello/README.md b/example/hello/README.md
--- a/example/hello/README.md
+++ b/example/hello/README.md
@@ -7,7 +7,7 @@
 ZEOLITE_PATH=$(zeolite --get-path)
 
 # Compile the example.
-zeolite -i lib/util -p "$ZEOLITE_PATH" -m HelloDemo example/hello
+zeolite -p "$ZEOLITE_PATH" -i lib/util -m HelloDemo example/hello
 
 # Execute the compiled binary.
 $ZEOLITE_PATH/example/hello/HelloDemo
diff --git a/src/Cli/CompileMetadata.hs b/src/Cli/CompileMetadata.hs
--- a/src/Cli/CompileMetadata.hs
+++ b/src/Cli/CompileMetadata.hs
@@ -354,18 +354,17 @@
     allChecks = map (\n -> (d,n) `Map.lookup` categoryMap >>= return . (:[])) (map show ns ++ [""])
     unwrap (Just xs) = xs
     unwrap _         = []
-  resolved = reverse $ nub $ reverse $ collectAll Set.empty directResolved
-  collectAll ca = concat . map (collect ca)
-  -- NOTE: Object files are collected with deps following things that depend on
-  -- them, without skipping over deps that have already been seen. This is so
-  -- that a dep strictly follows everything that depends on it. This is
-  -- is necessary when linking .a files.
-  collect ca c
-    | c `Set.member` ca = []
+  (_,_,resolved) = collectAll Set.empty Set.empty directResolved
+  collectAll ca fa [] = (ca,fa,[])
+  collectAll ca fa (c:cs)
+    | c `Set.member` ca = collectAll ca fa cs
     | otherwise =
       case c `Map.lookup` objectMap of
-           Just (CategoryObjectFile _ ds fs) -> fs ++ collectAll (c `Set.insert` ca) ds
-           Nothing -> []
+           Nothing -> collectAll ca fa cs
+           Just (CategoryObjectFile _ ds fs) -> (ca',fa'',fs') where
+             (ca',fa',fs0) = collectAll (c `Set.insert` ca) fa (ds ++ cs)
+             fa'' = fa' `Set.union` (Set.fromList fs)
+             fs' = (filter (not . flip elem fa') fs) ++ fs0
 
 resolveObjectDeps :: String -> [([String],CxxOutput)] -> [CompileMetadata] -> [ObjectFile]
 resolveObjectDeps p os deps = resolvedCategories ++ nonCategories where
diff --git a/zeolite-lang.cabal b/zeolite-lang.cabal
--- a/zeolite-lang.cabal
+++ b/zeolite-lang.cabal
@@ -1,5 +1,5 @@
 name:                zeolite-lang
-version:             0.1.2.0
+version:             0.1.2.1
 synopsis:            Zeolite is a statically-typed, general-purpose programming language.
 
 description:
