The code below is sort of what I'm looking for:
<[If IsSuperType]>
<[Foreach Entity]><[ If IsInHierarchyType TargetPerEntityHierarchy ]><[If IsSubType]><ServiceKnownType(GetType(<[CurrentEntityName]>))> _<[EndIf]><[EndIf]><[NextForeach]>
<[EndIf]>
However, since I'm calling Foreach Entity, it's modifying the current entity context and causing the rest of my template to screw up. Any suggestions?