If you really want to wait until the clock is enabled, then it should be "while (0==(GCLK->CLKCTRL.reg & GCLK_CLKCTRL_CLKEN));". Your TC is probably clocked from a slower clock, so it takes a few cycles for it to enable, so it was falling though on the first iteration.
In general, it probably is a good practice to wait, but in reality, even if clock is not enabled, your first access to the peripheral register will block until clock is enabled.