Call terminate on context destruction.