Fixed choosing incorrect method overload

The algorithm for choosing the right method for an overloaded function may choose the wrong one in some cases. Example:

public void test(string a, int b, bool c) { ... }
public void test(string a, int b, bool c, float d) { ... }

and then invoke it this way in JavaScript:

test("some text", 1234, true, 3.14);

it'll invoke the first one instead of the second because it found 3 matches and there are 3 arguments for the first function.