Returns the head of the current thread's scope stack.
Pops all scopes from the current thread's scope stack.