Fixed #5731 (False positive with opposite conditions)