The 1099-SA won’t be corrected, because it signifies all the money that was distributed in calendar year 2017. The money was distributed in calendar year 2017, so the amount on your 1099-SA is correct.
Here is what you need to understand, though: That money was indeed for qualified medical expenses from the perspective of 2017, as you did pay it to your doctor. The fact that the doctor overcharged you and refunded you in the next year is irrelevant for your 2017 taxes.
For 2017, the amount in question is a qualified medical expense, so no taxes or penalties due.
In 2018, when you received the refund, the expense became an unqualified expense; however, because you properly returned the refund to your HSA as a mistaken distribution, no penalty/tax will be due, this amount will not count toward your contribution limit, and you should still be able to contribute the full amount in addition to this refund.