Role of K-shell vacancies in determining charge-state fractions for heavy ions emerging from solids