--- plugins/views_plugin_query_default.inc	2010-04-17 10:48:41.651729600 +0100
+++ plugins/views_plugin_query_default.inc	2010-04-17 10:46:44.000000000 +0100
@@ -1,5 +1,5 @@
 <?php
-// $Id: views_plugin_query_default.inc,v 1.1.2.20 2010/02/06 10:25:17 dereine Exp $
+// $Id: views_plugin_query_default.inc,v 1.1.2.21 2010/03/12 01:02:45 merlinofchaos Exp $
 /**
  * @file views_plugin_query_default.inc
  * Defines the default query object which builds SQL to execute using the
@@ -654,23 +654,22 @@
     $alias = substr($alias, 0, 60);
 
     // Create a field info array.
-    $field_info = array(
-      'field' => $field,
-      'table' => $table,
-      'alias' => $alias,
-    ) + $params;
-
-    // Test to see if the field is actually the same or not. Due to
-    // differing parameters changing the aggregation function, we need
-    // to do some automatic alias collision detection:
-    $base = $alias;
-    $counter = 0;
-    while (!empty($this->fields[$alias]) && $this->fields[$alias] != $field_info) {
-      $field_info['alias'] = $alias = $base . '_' . ++$counter;
-    }
-
-    if (empty($this->fields[$alias])) {
-      $this->fields[$alias] = $field_info;
+ 		if (empty($this->fields[$alias])) {
+			$field_info = array(
+	      'field' => $field,
+	      'table' => $table,
+	      'alias' => $alias,
+	    ) + $params;
+	
+	    // Test to see if the field is actually the same or not. Due to
+	    // differing parameters changing the aggregation function, we need
+	    // to do some automatic alias collision detection:
+	    $base = $alias;
+	    $counter = 0;
+	    while (!empty($this->fields[$alias]) && $this->fields[$alias] != $field_info) {
+	      $field_info['alias'] = $alias = $base . '_' . ++$counter;
+	    }
+	    $this->fields[$alias] = $field_info;
     }
 
     return $alias;
