anchor.diff:    end;
   
     if  (lMethods.Count > 1)  then
  -    aRoot.RaiseNativeError(NativeErrorType.TypeError,String.Format( RemObjects.Script.Properties.Resources.Ambigious_overloaded_method_0_with_1_parameters, aNiceName, aArgs.Length));
  +    root.RaiseNativeError(NativeErrorType.TypeError,String.Format( RemObjects.Script.Properties.Resources.Ambigious_overloaded_method_0_with_1_parameters, methodName, parameters.Length));
   
     if  (lMethods.Count = 0)  then
  -    aRoot.RaiseNativeError(NativeErrorType.TypeError,String.Format( RemObjects.Script.Properties.Resources.No_overloaded_method_0_with_1_parameters, aNiceName, aArgs.Length));
  +    root.RaiseNativeError(NativeErrorType.TypeError,String.Format( RemObjects.Script.Properties.Resources.No_overloaded_method_0_with_1_parameters, methodName, parameters.Length));
   
     var lMeth := lMethods[0];
     var lParams := lMeth.GetParameters();
  
positive.code:     else if  ((lParams.Length > 0)  and  (length(lParams[lParams.Length-1].GetCustomAttributes(typeOf(ParamArrayAttribute), false)) > 0))  then 
        lParamStart := lParams.Length -1;
      // Now we'll have to see if the parameter types matches what's in the arguments array
      for  j: Int32  :=  0  to  length(aArgs)-1  do  begin
        if  (not IsCompatibleType(aArgs[j]:GetType,
                     if  ((lParamStart <> -1)  and  (j >= lParamStart))  then
                       lParams[lParams.Length-1].ParameterType.GetElementType()
                     else
                       lParams[j].ParameterType))  then  begin
          lMeth := nil;
          break;
        end;
  
negative.code: end;
  
  
  class method EcmaScriptObjectWrapper.FindAndCallBestOverload(methods: array of MethodBase;  root: GlobalObject;  methodName: String;
                     &self: Object;  parameters: array of Object): Object;
  begin
    var lMethods := new List<MethodBase>(methods);
  
    for  i: Int32  :=  0  to  length(parameters)-1  do  begin
      if  (parameters[i] is EcmaScriptObjectWrapper)  then
        parameters[i] := EcmaScriptObjectWrapper(parameters[i]).Value; // if these were wrapped before, we should unwrap
    end;
  
    for  i: Int32  :=  lMethods.Count-1  downto  0  do  begin
  