Correctly handle active handlers and continuations

Need to slice off handlers since the reset and restore them on invoke.