. . "except when required by law or when an agency has itself determined a project, program, activity, grant, or other transaction to have merit under statutory criteria or other merit-based decisionmaking." . . .