Index: wp-load.php
===================================================================
--- wp-load.php	(revision 15489)
+++ wp-load.php	(working copy)
@@ -51,4 +51,7 @@
 
 }
 
+if ( !isset( $wpdb ) )
+	require_once(ABSPATH . 'wp-settings.php');
+
 ?>
Index: wp-config-sample.php
===================================================================
--- wp-config-sample.php	(revision 15489)
+++ wp-config-sample.php	(working copy)
@@ -85,6 +85,3 @@
 /** Absolute path to the WordPress directory. */
 if ( !defined('ABSPATH') )
 	define('ABSPATH', dirname(__FILE__) . '/');
-
-/** Sets up WordPress vars and included files. */
-require_once(ABSPATH . 'wp-settings.php');
