fixed the bp3 serializer bug in AggregateCollectiveMetadataIndices function
Created by: lwan86
This is a performance bug. Before being fixed, the complexity of generating the collective metadata indices is n^2, where n is the number of writers. Now the complexity is n.