Fix alternative identifiers deletion, fixes #7418