correct sense of logic test (issue #5259)