This code should not yield the null Type() on failure. Instead, diagnose
the failure and yield an ErrorType. This matches what clients of this
function expect to signal failure.
Include a regression test that exercises a common failure mode if we
don't do this: module interface loading crashes.
rdar://62745419