Index: bootstrap.inc
===================================================================
--- bootstrap.inc	(revision 163)
+++ bootstrap.inc	(working copy)
@@ -674,7 +674,7 @@
   unset($conf[$name]);
 
   // The write-through rebuild optimization isn't compatible with SimpleTest.
-  if (strpos($db_prefix, 'simpletest') === 0) {
+  if ((is_string($db_prefix) && strpos($db_prefix, 'simpletest') === 0) || (isset($db_prefix['default']) && strpos($db_prefix['default'], 'simpletest') === 0)) {
     cache_clear_all('variables', 'cache');
   }
   
