Fix end of fold when folding functions with decorators.