Index: src/main/java/org/teiid/query/resolver/QueryResolver.java
===================================================================
--- src/main/java/org/teiid/query/resolver/QueryResolver.java	(revision 4603)
+++ src/main/java/org/teiid/query/resolver/QueryResolver.java	(working copy)
@@ -48,18 +48,7 @@
 import org.teiid.query.metadata.TempMetadataID;
 import org.teiid.query.metadata.TempMetadataStore;
 import org.teiid.query.parser.QueryParser;
-import org.teiid.query.resolver.command.AlterResolver;
-import org.teiid.query.resolver.command.BatchedUpdateResolver;
-import org.teiid.query.resolver.command.DeleteResolver;
-import org.teiid.query.resolver.command.DynamicCommandResolver;
-import org.teiid.query.resolver.command.ExecResolver;
-import org.teiid.query.resolver.command.InsertResolver;
-import org.teiid.query.resolver.command.SetQueryResolver;
-import org.teiid.query.resolver.command.SimpleQueryResolver;
-import org.teiid.query.resolver.command.TempTableResolver;
-import org.teiid.query.resolver.command.UpdateProcedureResolver;
-import org.teiid.query.resolver.command.UpdateResolver;
-import org.teiid.query.resolver.command.XMLQueryResolver;
+import org.teiid.query.resolver.command.*;
 import org.teiid.query.resolver.util.ResolverUtil;
 import org.teiid.query.resolver.util.ResolverVisitor;
 import org.teiid.query.sql.ProcedureReservedWords;
@@ -83,9 +72,9 @@
 import org.teiid.query.sql.visitor.ExpressionMappingVisitor;
 import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
 import org.teiid.query.validator.UpdateValidator;
-import org.teiid.query.validator.ValidationVisitor;
 import org.teiid.query.validator.UpdateValidator.UpdateInfo;
 import org.teiid.query.validator.UpdateValidator.UpdateType;
+import org.teiid.query.validator.ValidationVisitor;
 
 
 /**
@@ -466,7 +455,12 @@
 		        String updatePlan = qmi.getUpdatePlan(virtualGroup.getMetadataID());
 				String deletePlan = qmi.getDeletePlan(virtualGroup.getMetadataID());
 				String insertPlan = qmi.getInsertPlan(virtualGroup.getMetadataID());
-
+				//the elements must be against the view and not the alias
+				if (virtualGroup.getDefinition() != null) {
+					GroupSymbol group = new GroupSymbol(virtualGroup.getNonCorrelationName());
+					group.setMetadataID(virtualGroup.getMetadataID());
+					virtualGroup = group;
+				}
 	            List<ElementSymbol> elements = ResolverUtil.resolveElementsInGroup(virtualGroup, qmi);
 	    		UpdateValidator validator = new UpdateValidator(qmi, determineType(insertPlan), determineType(updatePlan), determineType(deletePlan));
 				validator.validate(result, elements);
Index: src/test/java/org/teiid/query/validator/TestValidator.java
===================================================================
--- src/test/java/org/teiid/query/validator/TestValidator.java	(revision 4603)
+++ src/test/java/org/teiid/query/validator/TestValidator.java	(working copy)
@@ -34,6 +34,7 @@
 import org.junit.Ignore;
 import org.junit.Test;
 import org.teiid.api.exception.query.QueryMetadataException;
+import org.teiid.api.exception.query.QueryParserException;
 import org.teiid.api.exception.query.QueryResolverException;
 import org.teiid.api.exception.query.QueryValidatorException;
 import org.teiid.client.metadata.ParameterInfo;
@@ -42,15 +43,15 @@
 import org.teiid.core.TeiidRuntimeException;
 import org.teiid.core.types.DataTypeManager;
 import org.teiid.dqp.internal.process.multisource.MultiSourceMetadataWrapper;
+import org.teiid.metadata.BaseColumn.NullType;
 import org.teiid.metadata.Column;
+import org.teiid.metadata.Column.SearchType;
 import org.teiid.metadata.ColumnSet;
 import org.teiid.metadata.MetadataStore;
 import org.teiid.metadata.Procedure;
 import org.teiid.metadata.ProcedureParameter;
 import org.teiid.metadata.Schema;
 import org.teiid.metadata.Table;
-import org.teiid.metadata.BaseColumn.NullType;
-import org.teiid.metadata.Column.SearchType;
 import org.teiid.query.analysis.AnalysisRecord;
 import org.teiid.query.mapping.relational.QueryNode;
 import org.teiid.query.mapping.xml.MappingDocument;
@@ -58,6 +59,7 @@
 import org.teiid.query.metadata.QueryMetadataInterface;
 import org.teiid.query.metadata.TransformationMetadata;
 import org.teiid.query.parser.QueryParser;
+import org.teiid.query.processor.TestProcessor;
 import org.teiid.query.resolver.QueryResolver;
 import org.teiid.query.sql.LanguageObject;
 import org.teiid.query.sql.lang.Command;
@@ -1961,4 +1963,17 @@
 		helpValidate("SELECT XMLELEMENT(NAME metadata, XMLFOREST(e1 AS objectName), (SELECT XMLAGG(XMLELEMENT(NAME subTypes, XMLFOREST(e1))) FROM pm1.g2 AS b WHERE b.e2 = a.e2)) FROM pm1.g1 AS a GROUP BY e1", new String[] {"a.e2"}, RealMetadataFactory.example1Cached());
 	}
 	
+	@Test public void testInsertIntoVirtualWithQueryExpression() throws QueryParserException, QueryResolverException, TeiidComponentException { 
+    	TransformationMetadata metadata = TestUpdateValidator.example1();
+        TestUpdateValidator.createView("select * from pm1.g1", metadata, "gx");
+        
+        String sql = "select * from gx as x"; //$NON-NLS-1$
+        
+        TestProcessor.helpGetPlan(sql, metadata);
+        
+        sql = "insert into gx (e1, e2, e3, e4) select * from pm1.g1"; //$NON-NLS-1$
+        
+        TestValidator.helpValidate(sql, new String[] {},  metadata);
+    }
+	
 }
