Ignore base classes when validating uniqueness

This PR addresses #418.