A 2013 amendment to a federal cyberstalking law was at the heart of the appeal.