Overload resolver sets parameter types

At the end, so after all sibling occurrences of a $n used more than once in the query (very rare) are done.

Includes previous branch as a prerequisite.