This is here because we need to overcome a tendecy of Dynamic Proxy to generate virtual override that do not match exactly what the compiler does. This means that when you do GetMethod("Foo") and DP has proxied it, you would get an exception because it would recognize two methods with this name. We recognize when we are trying to invoke something that DP has build and act accordingly. The code is mostly taken fro Boo.Lang.Runtime.RuntimeServices, and modified to understand that when the type is from DP, is should use DeclareOnly
Inheritance: Boo.Lang.Compiler.Steps.ExpandDuckTypedExpressions
        public object QuackInvoke(string name, object[] args)
        {
            if (target == null)
            {
                return(this);
            }
            var value = ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods.Invoke(target, name, args);

            return(new IgnoreNull(value));
        }
 public object QuackSet(string name, object[] parameters, object obj)
 {
     if (target == null)
     {
         return(this);
     }
     if (IsNullOrEmpty(parameters))
     {
         ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods.SetProperty(target, name, obj);
     }
     else
     {
         ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods.SetSlice(target, name,
                                                                                  GetParameterArray(parameters, obj));
     }
     return(this);
 }
        public object QuackGet(string name, object[] parameters)
        {
            if (name == "_IsIgnoreNullReferencingNotNullObject_")
            {
                return(target != null);
            }

            if (target == null)
            {
                return(this);
            }
            object value;

            if (IsNullOrEmpty(parameters))
            {
                value = ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods.GetProperty(target, name);
            }
            else
            {
                value = ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods.GetSlice(target, name, parameters);
            }
            return(new IgnoreNull(value));
        }