In density: fixed critical error in density_water_distance_from_matrix