Correct a bug introduced in a6599baba268af7e276454c2f123082ccb38cceb
which should used the inverse side of logic.

Ticket: #3658