Bug 329482 Uninstantiated part may be rendered when closing another part in the same stack
1. Activate the 'Javadoc' view. 2. Activate the 'Package Explorer' view. 3. Shutdown. 4. Restart. 5. Ctrl+3 > Properties 6. Hide the 'Properties' view. 7. Now the 'Problems' view is the selected element. It should be the 'Javadoc' view.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java
private EventHandler selectedHandler = new EventHandler() {
		public void handleEvent(Event event) {
			
			if (!listeners.isEmpty()) {
				Object oldSelected = event.getProperty(UIEvents.EventTags.OLD_VALUE);
				if (oldSelected instanceof MPlaceholder) {
					oldSelected = ((MPlaceholder) oldSelected).getRef();
				}
				Object selected = event.getProperty(UIEvents.EventTags.NEW_VALUE);
				if (selected instanceof MPlaceholder) {
					selected = ((MPlaceholder) selected).getRef();
				}
				MPart oldSelectedPart = oldSelected instanceof MPart ? (MPart) oldSelected : null;
				MPart selectedPart = selected instanceof MPart ? (MPart) selected : null;
				if (oldSelectedPart != null && getParts().contains(selectedPart)) {
					firePartHidden(oldSelectedPart);
				}
				if (selectedPart != null && selectedPart.isToBeRendered()
						&& getParts().contains(selectedPart)) {
					firePartVisible(selectedPart);
					firePartBroughtToTop(selectedPart);
				}
			}
		}
	};
	private MApplication application;
	/**