Handle duplicate named instances. Fixes #81