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'.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
private MApplication createApplication(String[]... partIds) {
		return createApplication(partIds.length, partIds);
	}
	private MApplication createApplication(int windows, String[][] partIds) {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		for (int i = 0; i < windows; i++) {
			MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
			application.getChildren().add(window);
			MPartStack partStack = BasicFactoryImpl.eINSTANCE.createPartStack();
			window.getChildren().add(partStack);
			for (int j = 0; j < partIds[i].length; j++) {
				MPart part = BasicFactoryImpl.eINSTANCE.createPart();
				part.setElementId(partIds[i][j]);
				partStack.getChildren().add(part);
			}
		}
		initialize(applicationContext, application);
		return application;
	}
	private void initialize(IEclipseContext applicationContext,
			MApplication application) {
		application.setContext(applicationContext);
		applicationContext.set(MApplication.class.getName(), application);
		E4Workbench.processHierarchy(application);
		((Notifier) application).eAdapters().add(
				new UIEventPublisher(applicationContext));
		applicationContext.set(ISaveHandler.class.getName(),
				new ISaveHandler() {
					public Save[] promptToSave(Collection<MPart> saveablePart) {