Preserve name indices for duplicate names

Without this fix, ArraySet objects only added the first copy of a name
if the "names" array contained duplicates. This messed up indices into
the names array because the array was shorter than it should be. The
TypeScript compiler sometimes generates source maps with duplicate
names, causing a crash in SourceMapConsumer.