Clear exceptions when pushing a context

Fixes #882