Recursively get superclass names for RefClasses