Add a unit test to verifies that attribute uniquing works so it doesn't break again.

The folding set details can be subtle and broke twice in the last couple of weeks.