Consistency changes and test fixes for bulk API queries