Index: wp-includes/widgets.php
===================================================================
--- wp-includes/widgets.php	(revision 12206)
+++ wp-includes/widgets.php	(working copy)
@@ -126,20 +126,24 @@
 
 	function _register() {
 		$settings = $this->get_settings();
+		$empty = true;
 
-		if ( empty($settings) ) {
-			// If there are none, we register the widget's existance with a
-			// generic template
-			$this->_set(1);
-			$this->_register_one();
-		} elseif ( is_array($settings) ) {
+		if ( is_array($settings) ) {
 			foreach ( array_keys($settings) as $number ) {
 				if ( is_numeric($number) ) {
 					$this->_set($number);
 					$this->_register_one($number);
+					$empty = false;
 				}
 			}
 		}
+
+		if ( $empty ) {
+			// If there are none, we register the widget's existance with a
+			// generic template
+			$this->_set(1);
+			$this->_register_one();
+		}
 	}
 
 	function _set($number) {
@@ -236,6 +240,13 @@
 			}
 		}
 
+		// housekeeping
+		foreach ( array_keys($all_instances) as $val ) {
+			if ( !is_numeric($val) )
+				unset($all_instances[$val]);
+				
+		}
+
 		$this->save_settings($all_instances);
 		$this->updated = true;
 	}
