make the type_map per connection. fixes #13182