Avoid a notice in the direct database query sniff

Fixes #184