Fix array flattening for the bulk index.