The agency is entitled to the benefit of any reservation or grant, in all cases, where any right has been reserved or granted to the state, or any agency or political subdivision thereof, or any public corporation, to construct or maintain water-related facilities in, under, or over any public or private lands. Nothing in this section authorizes the agency to construct facilities on lands owned or controlled by San Francisco without the consent of San Francisco.