moving pdiff max_attempts assignment before first reference (ResizeWorkflow)