Patch Set 4: Looks good to me, but someone else must approve

The issues I discovered during testing this change are not connected with it. I've already pushed an patch (http://egit.eclipse.org/r/#change,2374) that should fix errors that I spotted.