Work in progress for fixing #462
Fixes to type inference context

Don't use non-generic instance types as return type context if
the return type of a function is a type variable.

Fixes #462.
Update comment