Improved sorting of augmentations before code generation.