Interesting issue that I have never seen arise, but it looks like it's covered in Treasury Regulation 1.402A-1, Q&A 11 below. Reinvesting the dividends in employer stock that continues to be held in the participant's Roth account would allow a qualified distribution of that account balance later.
Q-11. Can an amount described in A-4 of § 1.402(c)-2 [note: subsection (e) of this cite is 404(k) dividends] with respect to a designated Roth account be a qualified distribution?
A-11. No. An amount described in A-4 of § 1.402(c)-2 with respect to a designated Roth account cannot be a qualified distribution. Such an amount is taxable under the rules of §§ 1.72-16(b), 1.72(p)-1, A-11 through A-13, 1.402(g)-1(e)(8), 1.401(k)-2(b)(2)(vi), 1.401(m)-2(b)(2)(vi), or 1.404(k)-1T. Thus, for example, loans that are treated as deemed distributions pursuant to section 72(p), or dividends paid on employer securities as described in section 404(k) are not qualified distributions even if the deemed distributions occur or the dividends are paid after the employee attains age 59 1/2 and the 5-taxable-year period of participation defined in A-4 of this section has been satisfied. However, if a dividend is reinvested in accordance with section 404(k)(2)(A)(iii)(II), the amount of such a dividend is not precluded from being a qualified distribution if later distributed. Further, an amount is not precluded from being a qualified distribution merely because it is described in section 402(c)(4) as an amount not eligible for rollover. Thus, a hardship distribution is not precluded from being a qualified distribution.