Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php	(revision 22544)
+++ wp-includes/theme.php	(working copy)
@@ -1031,18 +1031,20 @@
 		$data = _get_random_header_data();
 	} else {
 		$data = get_theme_mod( 'header_image_data' );
-		if ( ! $data && isset( $_wp_default_headers ) && current_theme_supports( 'custom-header', 'default-image' ) ) {
+		if ( ! $data && current_theme_supports( 'custom-header', 'default-image' ) ) {
 			$directory_args = array( get_template_directory_uri(), get_stylesheet_directory_uri() );
-			$default_image = vsprintf( get_theme_support( 'custom-header', 'default-image' ), $directory_args );
+			$data['url'] = $data['thumbnail_url'] = vsprintf( get_theme_support( 'custom-header', 'default-image' ), $directory_args );
+			if ( ! empty( $_wp_default_headers ) ) {
 			foreach ( (array) $_wp_default_headers as $header => $details ) {
 				$url = vsprintf( $details['url'], $directory_args );
-				if ( $default_image == $url ) {
+				if ( $data['url'] == $url ) {
 					$data = $details;
 					$data['url'] = $url;
 					$data['thumbnail_url'] = vsprintf( $data['thumbnail_url'], $directory_args );
 					break;
 				}
 			}
+			}
 		}
 	}
 
