The Unshelve task causes a sudden Hudson Restart without warning, which causes currently executing jobs to be aborted.
Instead of: Hudson.getInstance().restart(); // At least if nothing else safeRestart()
Use this: Hudson.getInstace().reload(); // Safe, does not abort current jobs, and works perfectly for this.
I have used the reload() when modifying the configuration on disc including all of the scm urls in all of the jobs, and it works perfectly.
The line in question is 52 in UnshelveProjectExecutable.