Fix a warning.
Avoid tail calls which breaks the test in finalizer-exception.cs.
Fix some cases of --debug=casts, add tests.