Index: wp-includes/ms-blogs.php
===================================================================
--- wp-includes/ms-blogs.php	(revision 23294)
+++ wp-includes/ms-blogs.php	(working copy)
@@ -687,6 +687,8 @@
 		( $value == 1 ) ? do_action( 'archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id );
 	elseif ( 'deleted' == $pref )
 		( $value == 1 ) ? do_action( 'make_delete_blog', $blog_id ) : do_action( 'make_undelete_blog', $blog_id );
+	elseif ( 'public' == $pref )
+		do_action( 'update_blog_public', $blog_id ); // Moved here from update_blog_public().
 
 	return $value;
 }
Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php	(revision 23294)
+++ wp-includes/general-template.php	(working copy)
@@ -1705,8 +1705,22 @@
  * @since 2.1.0
  */
 function noindex() {
+	$public = get_option( 'blog_public' );
+
+	if ( is_multisite() ) {
+		// Compare local and global and override with the local setting if they
+		// don't match.
+
+		global $current_blog;
+
+		if ( ( '' != $public ) && ( $public != $current_blog->public ) ) {
+			update_blog_status( get_current_blog_id(), 'public', $public );
+			$current_blog->public = $public;
+		}
+	}
+
 	// If the blog is not public, tell robots to go away.
-	if ( '0' == get_option('blog_public') )
+	if ( '0' == $public )
 		wp_no_robots();
 }
 
Index: wp-includes/ms-functions.php
===================================================================
--- wp-includes/ms-functions.php	(revision 23294)
+++ wp-includes/ms-functions.php	(working copy)
@@ -1770,9 +1770,7 @@
  * @return bool
  */
 function update_blog_public( $old_value, $value ) {
-	global $wpdb;
-	do_action('update_blog_public');
-	update_blog_status( $wpdb->blogid, 'public', (int) $value );
+	update_blog_status( get_current_blog_id(), 'public', (int) $value );
 }
 add_action('update_option_blog_public', 'update_blog_public', 10, 2);
 
