Allow matching with constructors which do not take all parameters from the factory method.
Fix constructor selection logic for some edge cases.