Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 15270)
+++ wp-includes/taxonomy.php	(working copy)
@@ -281,7 +281,7 @@
 		$wp->add_query_var($args['query_var']);
 	}
 
-	if ( false !== $args['rewrite'] && '' != get_option('permalink_structure') ) {
+	if ( !empty( $wp_rewrite ) && false !== $args['rewrite'] && '' != get_option('permalink_structure') ) {
 		$args['rewrite'] = wp_parse_args($args['rewrite'], array(
 			'slug' => sanitize_title_with_dashes($taxonomy),
 			'with_front' => true,
Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 15270)
+++ wp-includes/post.php	(working copy)
@@ -859,7 +859,7 @@
 		$wp->add_query_var($args->query_var);
 	}
 
-	if ( false !== $args->rewrite && '' != get_option('permalink_structure') ) {
+	if ( !empty( $wp_rewrite ) && false !== $args->rewrite && '' != get_option('permalink_structure') ) {
 		if ( !is_array($args->rewrite) )
 			$args->rewrite = array();
 		if ( !isset($args->rewrite['slug']) )
