Added failing unit test for unique constraints

This used to work in 2.5