[2.2] StringIdMapper collision handling

A piece left out by mistake from the original commit introducing StringIdMapper, where collisions are resolved by re-reading all node id string values and keeping the collided values.

It's very difficult to test this since the StringEncoder so valiantly prevents duplicates, but it would be good to add a test at some point.