Fix behaviour of scanQoQ option and improve check.

Was incorrectly doing an exact match on the whole query code instead of a
partial match on the opening tag only.

Fixes #13 on GitHub.