Fix bug when validating the uniqueness of an aliased attribute.