No longer cache all subclass templates.

Instead only cache direct subclasses and compute all known subclasses
as a transitive closure.