Fix #275 -- regression in db::_compile_select().  Thanks @patwork for the patch
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 508f6be..d94d4a1 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -60,7 +60,7 @@
 	var $ar_cache_set			= array();
 
 	var $ar_no_escape 			= array();
-
+	var $ar_cache_no_escape     = array();
 
 	// --------------------------------------------------------------------
 
@@ -93,6 +93,7 @@
 				{
 					$this->ar_cache_select[] = $val;
 					$this->ar_cache_exists[] = 'select';
+					$this->ar_cache_no_escape[] = $escape;
 				}
 			}
 		}
@@ -1933,16 +1934,17 @@
 	{
 		$this->_reset_run(
 							array(
-									'ar_cache_select'	=> array(),
-									'ar_cache_from'		=> array(),
-									'ar_cache_join'		=> array(),
-									'ar_cache_where'	=> array(),
-									'ar_cache_like'		=> array(),
-									'ar_cache_groupby'	=> array(),
-									'ar_cache_having'	=> array(),
-									'ar_cache_orderby'	=> array(),
-									'ar_cache_set'		=> array(),
-									'ar_cache_exists'	=> array()
+									'ar_cache_select'		=> array(),
+									'ar_cache_from'			=> array(),
+									'ar_cache_join'			=> array(),
+									'ar_cache_where'		=> array(),
+									'ar_cache_like'			=> array(),
+									'ar_cache_groupby'		=> array(),
+									'ar_cache_having'		=> array(),
+									'ar_cache_orderby'		=> array(),
+									'ar_cache_set'			=> array(),
+									'ar_cache_exists'		=> array(),
+									'ar_cache_no_escape'	=> array()
 								)
 							);
 	}
@@ -1984,6 +1986,8 @@
 		{
 			$this->_track_aliases($this->ar_from);
 		}
+
+		$this->ar_no_escape = $this->ar_cache_no_escape;
 	}
 
 	// --------------------------------------------------------------------