Const method overload fix

Added a test which shows that in case a method was overloaded with const, all the overloads got the ignore flag set by the CheckAmbiguousFunctionsPass instead of just the const overload.
Fixed by doing the constness check first.