Index: Class.cs
===================================================================
--- Class.cs	(revision 1071)
+++ Class.cs	(working copy)
@@ -142,27 +142,36 @@
 				} else
 					throw new NotImplementedEngineException ("Getting size of " + this);
 
-			} else if (this.classDefinition is TypeSpecification) {
-				if (step == 0) {
-					this.isSpecialType = true;
-					this.internalType = this.engine.GetInternalType (this.TypeFullName);
+            }
+            else if (this.classDefinition is TypeSpecification || (null != this.genericInstanceType && this.genericInstanceType is TypeSpecification))
+            {
+                if (step == 0)
+                {
+                    this.isSpecialType = true;
+                    this.internalType = this.engine.GetInternalType(this.TypeFullName);
 
-					if (this.classDefinition is ArrayType) {
-						this._base = this.engine.ArrayClass;
-						this.specialTypeElement = this.engine.GetClass ((this.classDefinition as ArrayType).ElementType);
+                    if (this.classDefinition is ArrayType)
+                    {
+                        this._base = this.engine.ArrayClass;
+                        this.specialTypeElement = this.engine.GetClass((this.classDefinition as ArrayType).ElementType);
 
-					} else
-						this._base = this.engine.GetClass (this.classDefinition.GetOriginalType ());
+                    }
+                    else
+                        this._base = this.engine.GetClass(this.classDefinition.GetOriginalType());
 
-					// initialize base class
-					if (this._base != null)
-						this._base.Setup (step);
+                    // initialize base class
+                    if (this._base != null)
+                        this._base.Setup(step);
 
-				} else if (step != 1)
-					throw new NotImplementedEngineException ();
+                }
+                else if (step != 1)
+                    throw new NotImplementedEngineException(this.TypeFullName + " not supported yet.");
 
-			} else
-				throw new NotImplementedEngineException ();
+            }
+            else
+            {
+                throw new NotImplementedEngineException(this.TypeFullName + " not supported yet.");
+            }
 		}
 
 		public void AddMethods ()
@@ -404,8 +413,36 @@
 		/// <returns></returns>
 		public Method GetMethodByName (MethodReference methodReference)
 		{
-			string value = Method.GetLabel (methodReference);
+            string value;
+            // FIXME: If the method reference is on a generic type, the methodReference.DeclaringType.FullName property
+            // contains the generic type and generic parameter information, which causes lookups by name to fail later.
+            //
+            // Method.GetLabel(methodReference) seems to be broken or wrong for generic types here.
+            if (this.isGenericType)
+            {
+                ParameterDefinitionCollection parameters = methodReference.Parameters;
 
+                // Use Engine.GetClass to retrieve the really used type (e.g. transform InternalSystem.Collections.Generic.Listī1 to System.Collections.Generic.Listī1)
+                Class typeClass = Engine.GetClass(methodReference.DeclaringType);
+                value = typeClass.TypeFullName; 
+                value += "." + methodReference.Name + "(";
+                for (int i = 0; i < parameters.Count; i++)
+                {
+                    if (i != 0)
+                        value += ",";
+
+                    value += parameters[i].ParameterType.FullName;
+                }
+
+
+                value += ")";
+
+            }
+            else
+            {
+                value = Method.GetLabel(methodReference);
+            }
+
 			if (this.methodsDictionary.ContainsKey (value))
 				return this.methodsDictionary [value];
 
@@ -437,7 +474,7 @@
 				return method;
 			}
 
-			throw new EngineException (string.Format ("Method '{0}' not found.", value));
+            throw new EngineException(string.Format("Method '{0}' not found.", value));
 		}
 
 		private MethodReference GetGenericMethod (GenericInstanceMethod genericInstanceMethod)
@@ -843,7 +880,7 @@
 					result = this.engine.ArrayClass.Size;
 
 				else
-					throw new NotImplementedEngineException ();
+					throw new NotImplementedEngineException ("Can't retrieve InternalSize for type " + this.classDefinition.ToString());
 
 				this.size = result;
 
