Add proper error for attempted use of undef slot (#50556)
Fixes the segfault in #50518 and turns it into a proper error at both
the syntax level (to catch lowering generating bad slot references) as
well as at the codegen level (to catch e.g. bad generated functions and
opaque closures). However, note that the latter case is technically
undefined behavior, because we do not model the possibility that an
otherwise-defined argument could throw at access time. Of course,
throwing an error is allowable as undefined behavior and preferable to a
segfault.