Fixes for allowing `:throw_undef_if_not` on the frontend (#53944)
https://github.com/JuliaLang/julia/pull/53875 allowed
`:throw_undef_if_not` as a frontend form.
However, the `UndefVarError` being tested is thrown because the first
argument is resolved to a global ref:
```julia
julia> @eval function has_tuin()
$(Expr(:throw_undef_if_not, :x, false))
end
has_tuin (generic function with 1 method)
julia> @code_lowered has_tuin() # master
CodeInfo(
1 ─ %1 = $(Expr(:throw_undef_if_not, :(Main.x), false))
└── return %1
)
julia> @code_lowered has_tuin() # this pr
CodeInfo(
1 ─ %1 = $(Expr(:throw_undef_if_not, :x, false))
└── return %1
)
```
This change skips this global ref resolution for the first argument and
fixes a typo which would throw an error in case of non-const second
argument.