Overload resolution anonymous methods

As discussed in #297