=== modified file 'includes/database/database.inc'
--- includes/database/database.inc	2008-11-15 08:23:06 +0000
+++ includes/database/database.inc	2008-11-17 22:48:09 +0000
@@ -916,9 +916,7 @@ abstract class Database {
     }
 
     if (!isset(self::$connections[$key][$target])) {
-      // If we're trying to open a target that doesn't exist, we need to know
-      // what the actual target we got was.
-      $target = self::openConnection(self::$activeKey, $target);
+      $target = self::openConnection($key, $target);
     }
 
     return isset(self::$connections[$key][$target]) ? self::$connections[$key][$target] : NULL;

