Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 8268)
+++ wp-includes/post.php	(working copy)
@@ -504,6 +504,21 @@
 	$parent_data = array( 'post_parent' => $post->post_parent );
 	$parent_where = array( 'post_parent' => $postid );
 
+	/*
+	 * if the page is defined in option page_on_front or post_for_posts, 
+	 * adjust the corresponding options
+	 */
+	if ('page' == $post->post_type){
+			
+		if ($postid == get_option('page_on_front')){
+			update_option('show_on_front', 'posts');
+			delete_option('page_on_front');
+		}
+		if ($postid == get_option('page_for_posts')){
+			delete_option('page_for_posts');
+		}
+	}
+
 	if ( 'page' == $post->post_type )
 		$wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'page' ) );
 

