Adds testcase for NOT on negative numbers. Fixes #605.