Made name clash checks work with classes.