To more fully understand how this works, does your cost basis continuously adjust as a fund trades shares?
An example: Say there's a fund that owns shares in 10 companies. You buy into it and your cost basis is set at the current value. That year the fund sells five of the stocks and buys five others, so you'd get capital gains (or loss) on those transactions that you'd have to pay taxes on. However your cost basis now adjusts to account for the new holdings, correct? You then sell the fund later in the year, and your gains cover the five stocks the fund never traded (with your original cost basis), plus the gains from the five new stocks since the fund bought them.
I guess I'm trying to project my understanding of how cost basis and gains work for an individual investor onto mutual funds, which with lots of trading, people coming in and out of the fund, reinvestment, etc. may not be applicable.