Allow buffer optimization with size zero

Created by: dalg24

Weird use case a callback is used to get the results out and insert() never gets called. The problem is this triggers the second pass which is totally unnecessary.