diff --git a/lib/master.pike b/lib/master.pike
index 9720ea09d97386ea2adf872a16b2c48c571bcbd7..580a2622e2095ee3a17cc198d4e0ec3179235465 100644
--- a/lib/master.pike
+++ b/lib/master.pike
@@ -208,8 +208,13 @@ class dirnode
   object|program `[](string index)
   {
     index=dirname+"/"+index;
-    return
-      ((object)"/master")->findmodule(index) || (program) index;
+    if(object o=((object)"/master")->findmodule(index))
+    {
+      if(mixed tmp=o->_module_value)
+	return tmp;
+      return o;
+    }
+    return (program) index;
   }
 };
 
@@ -225,7 +230,7 @@ class mergenode
   }
 };
 
-object low_findmodule(string fullname)
+object findmodule(string fullname)
 {
   mixed *stat;
   program p;
@@ -249,25 +254,13 @@ object low_findmodule(string fullname)
   if(mixed *stat=file_stat(fullname))
   {
     if(stat[1]==-2)
-      return low_findmodule(fullname+"/module");
+      return findmodule(fullname+"/module");
   }
 #endif
 
   return UNDEFINED;
 }
 
-mixed findmodule(string path)
-{
-  if(object o=low_findmodule(path))
-  {
-    if(mixed tmp=o->_module_value)
-    {
-      return tmp;
-    }
-  }
-  return o;
-}
-
 varargs mixed resolv(string identifier, string current_file)
 {
   mixed ret;
@@ -278,19 +271,30 @@ varargs mixed resolv(string identifier, string current_file)
     tmp=current_file/"/";
     tmp[-1]=identifier;
     path=combine_path(getcwd(), tmp*"/");
-    if(ret=findmodule(path)) return ret;
+    ret=findmodule(path);
   }
 
-  foreach(pike_module_path, path)
-    {
-      path=combine_path(path,identifier);
-      if(ret=findmodule(path)) return ret;
-    }
+  if(!ret)
+  {
+    foreach(pike_module_path, path)
+      {
+	path=combine_path(path,identifier);
+	if(ret=findmodule(path)) break;
+      }
+  }
 
-  string path=combine_path(pike_library_path+"/modules",identifier);
-  if(ret=findmodule(path)) return ret;
+  if(!ret)
+  {
+    string path=combine_path(pike_library_path+"/modules",identifier);
+    if(!(ret=findmodule(path)))
+      ret=_static_modules[identifier];
+  }
 
-  if(ret=_static_modules[identifier]) return ret;
+  if(ret)
+  {
+    if(mixed tmp=ret->_module_value) return tmp;
+    return ret;
+  }
   return UNDEFINED;
 }
 
diff --git a/src/configure.in b/src/configure.in
index e38120d7e56ffddf344fea46c660f50c0cc9a08c..f4e8ac8260900f02f8ce5ba3b3c43c12b3979fad 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1,4 +1,4 @@
-AC_REVISION("$Id: configure.in,v 1.56 1997/02/07 00:54:36 hubbe Exp $")
+AC_REVISION("$Id: configure.in,v 1.57 1997/02/20 00:04:59 hubbe Exp $")
 AC_INIT(interpret.c)
 AC_CONFIG_HEADER(machine.h)
 
@@ -427,26 +427,6 @@ if test "${pike_cv_sys_os}" = "Linux"; then
     AC_MSG_WARN(I will compensate for this by adding -lc -lm)
     LIBS="${LIBS} -lc -lm"
   fi
-
-#if 0
-  if test $ldflags_is_set ; then
-    AC_MSG_CHECKING(for -rdynamic)
-    AC_CACHE_VAL(pike_cv_ld_accepts_rdynamic,
-    [
-      OLD_LDFLAGS="$LDFLAGS"
-      LDFLAGS="$LFFLAGS -rdynamic"
-      AC_TRY_LINK([],[ exit(0); ],[
-        pike_cv_ld_accepts_rdynamic=yes
-      ],[ pike_cv_ld_accepts_rdynamic=no ])
-      LDFLAGS="$OLD_LDFLAGS"
-    ])
-    AC_MSG_RESULT($pike_cv_ld_accepts_rdynamic)
-
-    if test x$pike_cv_ld_accepts_rdynamic = xyes ; then
-       LDFLAGS="$LDFLAGS -rdynamic"
-    fi
-  fi
-#endif
 fi
 
 ########################################################################