Test "NOT IN" queries

Fixes #1182. @alazier ?