Bug 311722 E4XMIResource's getUniqueId() is implemented incorrectly
private String getUniqueId() { String id = createId(); while (objectMap.get(id) != null) { id = createId(); } return id; } Here, 'objectMap' is a Map<EObject, String> but we use a String as a key. This is obviously wrong.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/E4XMIResource.java
@Override
	public void setID(EObject eObject, String id) {
		if (id != null) {
			String internalId = objectMap.get(eObject);
			if (internalId != null) {
				super.setID(eObject, internalId);
			}
			objectMap.put(eObject, id);
		}
		super.setID(eObject, id);
	}
	@Override
	public String getID(EObject eObject) {
		if (eObject instanceof Entry<?, ?>) {
			return null;
		}
		String id = super.getID(eObject);
		if (id != null) {
			return id;
		}
		id = objectMap.get(eObject);
		if (id != null) {
			return id;
		}
		id = getUniqueId();
		setID(eObject, id);
		return id;
	}
}