If you have a purchase and sale of the same thing within a 30 day window, and have a loss, you need to read up on the IRS wash sale rule. Selling all of the Mid Cap fund (VIMAX) might avoid the problem, but I'm not sure since I generally just wait.
You said your motivation is the expense ratio: 0.09% - 0.05% = 0.04% / year
$30,000 x 0.0004 = $12 / year
Qualified dividends are very easy to ignore, but I think you shouldn't for this case. US median income is 25% bracket. Qualified dividends for the 25% are taxed at 15%. So let me run the Mid Cap $150 dividend through two situations:
(1) you sell now. You did not wait 60 days, so you owe ordinary income tax on $150.
$150 x .25 = $37.50
(2) you wait 2 months (60 day rule) to make the dividends qualified. You owe 15% tax on $150.
$150 x .15 = $22.50
So if you switch right now, I'd guess you'll pay $15 more in taxes to save $2 in expense ratio. You can search for "qualified dividends irs" to find out more. The critical sentence is under Holding Period: " You must have held the stock for more than 60 days ...". So waiting 60 days might be more important than the expense ratio, in this case.