URITransformer*: replace one Map with a MapBuilder

Also add an error condition: cannot redirect to self. Prior to this, a key equal
to the value was silently ignored.