Fix fold to better handle type annotations on cases.