PY-18181 Folding: Folding doesn't work with 'with' statement