Fix a bug of LOGICAL_NOT.

Redmine: fixes #2381.