Fixes shutdown issue with TaskExecutor

where a shutdown caused by task failure might not be able to complete.
imho unnecessary since there will be very very few calls to shutdown. Also that check would have to be duplicated.