[Bug #8640] added a check to prevent deletion of an undefined data-attribute.