Tilovell/1613 better handling of duplicate email addresses

Fixing #1613