Fix a bad overflow check pointed out by Ben.