update TREMatchEngine.OptimizeLoop