Nothing contained in this part shall be taken to authorize or to sanction the construction under the Federal reclamation laws or under any Rivers and Harbors or Flood Control Act of any project in which the sum of the allocations to recreation and fish and wildlife enhancement exceeds the sum of the allocations to irrigation, hydroelectric power, municipal, domestic and industrial water supply, navigation, and flood control, except that this section shall not apply to any such project for the enhancement of anadromous fisheries, shrimp, or for the conservation of migratory birds protected by treaty, when each of the other functions of such a project has, of itself, a favorable benefit-cost ratio.