Fix wrong test: boolean variable is never negative

This has been spotted by clang++.