 			
 			vertexCopy.position = 0;
 			
+			
+			var newLimit : uint = 0;
+			
 			for (var oldVertexId : uint = 0; oldVertexId < numVertices; ++oldVertexId)
 			{
 				var vertexHash	: uint		= CRC32.computeForByteArrayChunk(vertexCopy, bytesPerVertex);

		private static const INDEX_LIMIT	: uint = 524270;
		private static const VERTEX_LIMIT	: uint = 65535;
		
		/**
		 * Split vertex and index buffers too big the be rendered.
		 * The index stream limit is 524270, the vertex stream limit is 65536.

					newVertexId = newVertexCount++;
					hashToNewVertexId[vertexHash] = newVertexId;
					
					newLimit = (1 + newVertexId) * dwordsPerVertex;
					
					if (newVertexId != oldVertexId)
					{
						var oldOffset	: uint = oldVertexId * dwordsPerVertex;
						var newOffset	: uint = newVertexId * dwordsPerVertex;
						
						for (; newOffset < newLimit; ++newOffset, ++oldOffset)
							vertexData[newOffset] = vertexData[oldOffset];
