Return correct error on name collision when creating new named
objects.
Check for correct error in affected places.

11 files changed