updateMap = (metadata: ReactSourceMetadata, sourceIndex: number) => {
      let source = basicMap.sources[sourceIndex];
      if (source != null) {
        source = normalizeSourcePath(source, basicMap);
        metadataMap.set(source, metadata);
      }
    }
Collects source metadata from the given map using the current source name
normalization function. Handles both index maps (with sections) and plain
maps.

NOTE: If any sources are repeated in the map (which shouldn't usually happen,
but is technically possible because of index maps) we only keep the
metadata from the last occurrence of any given source.