Index: wp-includes/canonical.php
===================================================================
--- wp-includes/canonical.php	(revision 17109)
+++ wp-includes/canonical.php	(working copy)
@@ -403,7 +403,7 @@
 	if ( get_query_var('day') )
 		$where .= $wpdb->prepare(" AND DAYOFMONTH(post_date) = %d", get_query_var('day'));
 
-	$post_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE $where AND post_status = 'publish'");
+	$post_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE $where AND post_status = 'publish' ORDER BY post_parent ASC");
 	if ( !$post_id )
 		return false;
 	return get_permalink($post_id);
