--- dumper.py	2011-11-22 17:08:31.995515275 +0100
+++ dumper.py.mio	2011-11-22 17:07:00.803519087 +0100
@@ -239,17 +239,17 @@
         # likely to be uninstalled yet and we want the uninstalled RPATHs have
         # priority (or we might run with installed library that is older)
 
-        if not self._options.external_library:
-            self._add_link_internal_args(args, libtool)
-        else:
-            self._add_link_external_args(args)
-
         for source in sources:
             if not os.path.exists(source):
                 raise CompilerError(
                     "Could not find object file: %s" % (source, ))
         args.extend(list(sources))
 
+        if not self._options.external_library:
+            self._add_link_internal_args(args, libtool)
+        else:
+            self._add_link_external_args(args)
+
         if not self._options.quiet:
             print "g-ir-scanner: link: %s" % (
                 subprocess.list2cmdline(args), )
