Fix an issue with inconsistent item identities