Various updates to compiletest in an attempt to make forward progress in face of error msg blowup.
Avoid an ICE when a static block attempts to borrow its own local var.

Fix #18118.  (Though I still need to put in a compile-fail test.)
Some test updates.  Though the diff clearly shows that I need to revise further,
in face of compiletest extensions I have put in earlier.