Steps to reproduce:
1. Create a new user
2. Once created, click on the edit button and try to modify some of its information (adding/removing roles, changing the name, the email, etc.)
The user information is not updated and a very ugly exception is printed in the logs (see attachment)
Any modification of the roles assigned after creation fails every time. Modifying other parameters may work the first time, but fail on the second attempt.
The user data should be updated without errors
Workaround (if any):