Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 19621)
+++ wp-includes/post.php	(working copy)
@@ -1985,6 +1985,14 @@
 	$parent_data = array( 'post_parent' => $post->post_parent );
 	$parent_where = array( 'post_parent' => $postid );
 
+	if ( is_post_type_hierarchical( $post->post_type ) ) {
+		// Point children of this page to its parent, also clean the cache of affected children
+		$children_query = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_parent = %d AND post_type = %s", $postid, $post->post_type );
+		$children = $wpdb->get_results( $children_query );
+
+		$wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => $post->post_type ) );
+	}
+
 	if ( 'page' == $post->post_type) {
 	 	// if the page is defined in option page_on_front or post_for_posts,
 		// adjust the corresponding options
@@ -1995,12 +2003,6 @@
 		if ( get_option('page_for_posts') == $postid ) {
 			delete_option('page_for_posts');
 		}
-
-		// Point children of this page to its parent, also clean the cache of affected children
-		$children_query = $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE post_parent = %d AND post_type='page'", $postid);
-		$children = $wpdb->get_results($children_query);
-
-		$wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'page' ) );
 	} else {
 		unstick_post($postid);
 	}
@@ -2037,14 +2039,16 @@
 	if ( 'page' == $post->post_type ) {
 		clean_page_cache($postid);
 
-		foreach ( (array) $children as $child )
-			clean_page_cache($child->ID);
-
 		$wp_rewrite->flush_rules(false);
 	} else {
 		clean_post_cache($postid);
 	}
 
+	if ( is_post_type_hierarchical( $post->post_type ) ) {
+		foreach ( (array) $children as $child )
+			clean_post_cache( $child->ID );
+	}
+
 	wp_clear_scheduled_hook('publish_future_post', array( $postid ) );
 
 	do_action('after_delete_post', $postid);
