Steps to reproduce:
Create a first user
Create a second user
Go to Site Settings and activate "Require Unique Display Names"
Change user2 DisplayName to "OtherName"
Logout and relogin with user2
Go to profile and change the DisplayName back to "MyName"
What happens: it works
What should happen: an error message should show that says this DisplayName is already taken.