Dams built to prevent coastal flooding can worsen it