Fixup index-consistency bug in batchBuildKernel