DomElement () { AbstractDomChildDescriptionImpl description = getChildDescription(); final DomElement parent = getParent(); assert parent != null; final DomElement parentCopy = parent.createStableCopy(); final int index = description.getValues(parent).indexOf(getProxy()); return getManager().createStableValue((Factory<DomElement>)() -> { if (parentCopy.isValid()) { final List<? extends DomElement> list = description.getValues(parentCopy); if (list.size() > index) { return list.get(index); } } return null; }); }