TEIID-3111 making function resolving more consistent