Add test for #5062
rustc::regionck: fix ICE when getting signature of ty_err

Fixes #5062