simplify code to detect nested &throw-context