Only check for duplicate ids if entry or macro is edited
When editing an element, check if the user-set id is a duplicate to
an already existing element's id only if the edited element happens
to be either an entry or a macro (but not something else like a
comment or a preamble, which don't have ids).