fix bug in CWAIT_COLLECT_IDENTICAL_RESPONSES when a backend returns a different response
implement SCAN command