Hi @fre4ki , just to follow up, another dev was able to reproduce this. When I tested, I was adding and removing role attributes from identities, and wasn't able to break it. Turns out, you need to delete the identity entirely for this to happen. I was also able to update the db integrity checker to fix any dangling references. Both fixes for this should be in the next release.
Cheers,
Paul