Rewrite NestedBlocksCheck using Strongly Typed AST