Correct condition.

Ticket: #7309
(cherry picked from commit eee42d55bdeaff6e974edb9477512089fbfe30d3)