Experimental new scope tracker for collect_variables. Tries to catch mixed single-line and bracketed statements.