In haveSubclassOf, use HashSet to remove duplicates.