avoid returning dupes from getSupertypeDeclarations()
fix getSupertypeDeclarations() for union types