Preventing thread safety issues by making a copy of the type transformer map