The HasMatchingScope check method can be called only once per syntactic rules, today this method is called for each node analyzed by the syntactic rules.
When doing a RegisterNodeAction, do the check before by doing first a RegisterCompilationStartAction.