Remove shared pointer from NameTransformer.