clear dynamically scoped variables also on exceptions