perf: skip closed subterms in the scope check of a `do` block

The scope check at the end of a `do` block no longer descends into subterms without free variables. A nested `do` block is part of the term of every enclosing block, and after abstraction its term is usually closed, so the enclosing checks no longer traverse it again.
1 file changed