Bug 327933 Unrendering container with invalid selectedElement can cause target element to be unrendered
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
context.set(intf.getName(), contextModel);
			populateModelInterfaces(contextModel, context, intf.getInterfaces());
		}
	}
	private String getContextName(MUIElement element) {
		StringBuilder builder = new StringBuilder(element.getClass()
				.getSimpleName());
		String elementId = element.getElementId();
		if (elementId != null && elementId.length() != 0) {
			builder.append(" (").append(elementId).append(") ");
		}
		builder.append("Context");
		return builder.toString();
	}
	public Object createGui(MUIElement element, Object parentWidget,
			IEclipseContext parentContext) {
		if (!element.isToBeRendered())
			return null;
		if (!renderedElements.contains(element))
			renderedElements.add(element);
		
		if (removeRoot != null) {
			return null;
		}
		if (element.getWidget() != null) {
			if (element.getWidget() instanceof Control
					&& parentWidget instanceof Composite) {
				Control ctrl = (Control) element.getWidget();
				if (ctrl.getParent() != parentWidget) {
					ctrl.setParent((Composite) parentWidget);