When Will Gradient Regularization Be Harmful?