Handle newtypes and type functions correctly in FFI types; fixes #3008
You can now use type functions in FFI types. Newtypes are now only looked through if the constructor is in scope.
You can now use type functions in FFI types. Newtypes are now only looked through if the constructor is in scope.