Bug 315698 'persistedState' feature not reconciled for existing contributions
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/XMLModelReconciler.java
List<Object> collectedRefs = new ArrayList<Object>(currentReferences);
		for (Position position : positions) {
			Object after = position.getAfter();
			if (after != null) {
				int index = currentReferences.indexOf(after);
				collectedRefs.add(index + 1, position.getObject());
			}
			Object before = position.getBefore();
			if (before != null) {
				int index = currentReferences.indexOf(before);
				collectedRefs.add(index, position.getObject());
			}
		}
		return collectedRefs;
	}
	private static Position getPosition(List<?> originalReferences, List<?> userReferences,
			List<?> currentReferences, Object object, int originalIndex) {
		int index = originalReferences.indexOf(object);
		if (index == -1) {
			Object after = null;
			for (int i = originalIndex - 1; i > -1; i--) {
				Object afterCandidate = userReferences.get(i);
				int afterIndex = currentReferences.indexOf(afterCandidate);
				if (afterIndex != -1) {
					after = afterCandidate;
					break;
				}
			}
			Object before = null;
			for (int i = originalIndex + 1; i < userReferences.size(); i++) {