handle references in extendComposition/extendUnion