Fix EZP-21952: user anonymous cannot be redefined

This PR resolves issue https://jira.ez.no/browse/EZP-21952