Fixed a bug with Identities having objects for roles being modified by AuthenticationProvider.