simplify matched condition (IDEA-128096)
(cherry picked from commit 0b93c03) [r=Maxim.Mossienko]