diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java index 24b680eb7..4346b309b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java @@ -1368,7 +1368,9 @@ public class Element extends Base { dest.value = value; if (children != null) { dest.children = new ArrayList<>(); - dest.children.addAll(children); + for (Element child : children) { + dest.children.add((Element) child.copy()); + } } else { dest.children = null; }