Move `@import` and `@charset` to the top. Closes #1759