Changed function resolution and detection of ordered set functions.Added support for type unification and coercion for hypothetical set functions