Index: wp-includes/rewrite.php
===================================================================
--- wp-includes/rewrite.php	(revision 13811)
+++ wp-includes/rewrite.php	(working copy)
@@ -1365,32 +1374,33 @@
 
 			//create query for /page/xx
 			$pagematch = $match . $pageregex;
-			$pagequery = $index . '?' . $query . '&paged=' . $this->preg_index($num_toks + 1);
+			$pagequery = add_query_arg('paged', $this->preg_index($num_toks + 1), $index . '?' . $query);
 
 			//create query for /comment-page-xx
 			$commentmatch = $match . $commentregex;
-			$commentquery = $index . '?' . $query . '&cpage=' . $this->preg_index($num_toks + 1);
+			$commentquery = add_query_arg('cpage', $this->preg_index($num_toks + 1), $index . '?' . $query);
 
 			if ( get_option('page_on_front') ) {
 				//create query for Root /comment-page-xx
 				$rootcommentmatch = $match . $commentregex;
-				$rootcommentquery = $index . '?' . $query . '&page_id=' . get_option('page_on_front') . '&cpage=' . $this->preg_index($num_toks + 1);
+				$rootcommentquery = add_query_arg(array(
+					'page_id' => get_option('page_on_front'), 
+					'cpage' => $this->preg_index($num_toks + 1)
+				), $index . '?' . $query);
 			}
 
 			//create query for /feed/(feed|atom|rss|rss2|rdf)
 			$feedmatch = $match . $feedregex;
-			$feedquery = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);
+			$feedquery = add_query_arg('feed', $this->preg_index($num_toks + 1), $feedindex . '?' . $query);
 
+			//if asked to, turn the feed query into a comment feed one
+			if ( $forcomments )
+				$feedquery = add_query_arg('withcomments', 1, $feedquery);
+
 			//create query for /(feed|atom|rss|rss2|rdf) (see comment near creation of $feedregex)
 			$feedmatch2 = $match . $feedregex2;
-			$feedquery2 = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);
+			$feedquery2 = $feedquery;
 
-			//if asked to, turn the feed queries into comment feed ones
-			if ( $forcomments ) {
-				$feedquery .= '&withcomments=1';
-				$feedquery2 .= '&withcomments=1';
-			}
-
 			//start creating the array of rewrites for this dir
 			$rewrite = array();
 			if ( $feed ) //...adding on /feed/ regexes => queries
