Disentangling dam impacts in river networks