revert to unnamed if there is a name collision

actually a small fix for name collision errors

Fixes #1217