When is surgery necessary for a groin hernia?