Index: src/sqlabstraction/query_subselect.php
===================================================================
--- src/sqlabstraction/query_subselect.php	(revision 6349)
+++ src/sqlabstraction/query_subselect.php	(working copy)
@@ -53,11 +53,7 @@
     public function __construct( ezcQuery $outer )
     {
         $this->outerQuery = $outer;
-
-        if ( $this->expr === null )
-        {
-            $this->expr = ezcDbInstance::get()->createExpression();
-        }
+        $this->expr = $this->outerQuery->expr;
     }
 
     /**
Index: src/sqlabstraction/query_select.php
===================================================================
--- src/sqlabstraction/query_select.php	(revision 6349)
+++ src/sqlabstraction/query_select.php	(working copy)
@@ -894,21 +894,6 @@
         }
         return $query;
     }
-
-    /**
-     * Returns the ezcQuerySubSelect query object.
-     *
-     * This method creates new ezcQuerySubSelect object
-     * that could be used for building correct
-     * subselect inside query.
-     *
-     * @return ezcQuerySubSelect
-     */
-    public function subSelect()
-    {
-        return new ezcQuerySubSelect( $this );
-    }
-
 }
 
 ?>
Index: src/sqlabstraction/query.php
===================================================================
--- src/sqlabstraction/query.php	(revision 6349)
+++ src/sqlabstraction/query.php	(working copy)
@@ -389,5 +389,19 @@
      * @return string
      */
     abstract public function getQuery();
+
+    /**
+     * Returns the ezcQuerySubSelect query object.
+     *
+     * This method creates new ezcQuerySubSelect object
+     * that could be used for building correct
+     * subselect inside query.
+     *
+     * @return ezcQuerySubSelect
+     */
+    public function subSelect()
+    {
+        return new ezcQuerySubSelect( $this );
+    }
 }
 ?>
