Raise error when identifiers are not unique

Potential fix for #434.

The `create-item` and `create-layout` commands check whether the item/layout to create already exists, but the check happens nowhere else.