Band structure induced changes of the dielectric response upon potassium intercalation in graphite studied by inelastic x-ray scattering