This check shouldn't be inverted

Fixes #1545