Add support for multiple teams with the same primary name (issue #77)

Fixes issue #77