Thank you very much.

I think I had other solution. It is a combination with your solution and my solution.

I will add the flattenTerms step with setSort of KItem before FlattenSyntax steps.

Then I will create another flattenTerms step without setSort before ResolveSyntaxPredicate step. I think this will work.