fix: #3626014 DrupalKernel::terminate() leaves the main request on the stack...
fix: #3626014 DrupalKernel::terminate() leaves the main request on the stack when termination throws
By: ptmkenny
By: bbrala
By: daffie
(cherry picked from commit 290b5ad0)