Clear exceptions when pushing a context

Fixes #882
Merge branch '0.10-maintenance'