Bug 338707 Reconciler chokes on elements under parents that have been removed from the model
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/XMLModelReconciler.java
}
		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++) {
				Object beforeCandidate = userReferences.get(i);
				int beforeIndex = currentReferences.indexOf(beforeCandidate);
				if (beforeIndex != -1) {
					before = beforeCandidate;
					break;
				}
			}
			return new Position(object, after, before);
		}
		return null;
	}
	static class Position {