Move the filtering of unchecked nodes to the PatternExtraction class.