fn fix_adaptive_stages(value: &mut Value)