BZ-980775: in STREAM mode, force event queue flush before executing each query