You're right. Best speed for max glide range over the earth changes depending on the wind
As an example, consider a small plane with a published best glide of 50 knots. If you are flying into a 50 knot headwind, your ground speed would be nothing. If you fly faster than 50 knots, you will have a positive groundspeed, and therefore have a better glide distance.
Published glides speeds assume a particular weight and give you best distance through your air mass, not best distance over the ground. Similar things apply to best range speeds.