I think you want to skip the chunks that have already been inserted. Otherwise you may end up with less chunks than needed.