Kill session if before_script fails. Handle case with temp_session context mgr where session is killed within its scope.