Bug 327044 EPartService's hidePart(*) should unset the part's parent element if the part is the selected element
It is not valid to have a selected element that's TBR flag is 'false'.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java
if (category == null) {
				addToLastContainer(null, providedPart);
			} else {
				List<MElementContainer> containers = modelService.findElements(getContainer(),
						null, MElementContainer.class, Collections.singletonList(category));
				if (containers.isEmpty()) {
					addToLastContainer(category, providedPart);
				} else {
					MElementContainer container = containers.get(0);
					MPlaceholder placeholder = providedPart.getCurSharedRef();
					if (placeholder == null) {
						container.getChildren().add(providedPart);
					} else {
						container.getChildren().add(placeholder);
					}
				}
			}
		}
		return providedPart;
	}
	private void adjustPlaceholder(MPart part) {
		if (isShared(part)) {
			MPlaceholder placeholder = part.getCurSharedRef();
			
			if (placeholder == null
			
			
			
					|| (placeholder.getParent() != null && !isInContainer(placeholder))) {
				placeholder = createSharedPart(part);