Don't duplicate query handling for scans and queries