Merge "Swap order of affine parameters" into nextgenv2