Remove a few redundant checks to context.isTerminated