Another correction following #3384
diff --git a/system/core/Output.php b/system/core/Output.php
index af3c1e7..f552188 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -729,10 +729,9 @@
 		if (empty($uri))
 		{
 			$uri = $CI->uri->uri_string();
+			empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING'];
 		}
 
-		empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING'];
-
 		$cache_path .= md5($CI->config->item('base_url').$CI->config->item('index_page').$uri);
 
 		if ( ! @unlink($cache_path))