Factor out the published/buffer renewal logic to _resetPublishedAndBuffer

Fixes the bug when initial query is larger than published+buffer (limit * 2)