See bug 163391. ResourceSetWorkbenchEditSynchronizer unloads resources prematurely in headless mode.
This patch should be applied with org.eclipse.wst.common_core.feature.patch.