Changed to resolve untyped results with single row results as alternative variables for resolve_refs.
Changed to resolve untyped results with single row results as alternative variables for resolve_refs.

cjungmann/schemafw,cjungmann/schemafw,cjungmann/schemafw,cjungmann/schemafw,cjungmann/schemafw