Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 6328)
+++ wp-admin/includes/template.php	(working copy)
@@ -123,13 +123,14 @@
 
 function write_nested_categories( $categories ) {
 	foreach ( $categories as $category ) {
-		echo '<li id="category-', $category['cat_ID'], '"><label for="in-category-', $category['cat_ID'], '" class="selectit"><input value="', $category['cat_ID'], '" type="checkbox" name="post_category[]" id="in-category-', $category['cat_ID'], '"', ($category['checked'] ? ' checked="checked"' : "" ), '/> ', wp_specialchars( apply_filters('the_category', $category['cat_name'] )), "</label></li>";
+		echo '<li id="category-', $category['cat_ID'], '"><label for="in-category-', $category['cat_ID'], '" class="selectit"><input value="', $category['cat_ID'], '" type="checkbox" name="post_category[]" id="in-category-', $category['cat_ID'], '"', ($category['checked'] ? ' checked="checked"' : "" ), '/> ', wp_specialchars( apply_filters('the_category', $category['cat_name'] )), "</label>";
 
 		if ( $category['children'] ) {
 			echo "<ul>\n";
 			write_nested_categories( $category['children'] );
 			echo "</ul>\n";
 		}
+		echo "</li>";
 	}
 }
 
