In Wikipedia, the formula for the forward price of a tradable underlying that pays discrete dividends is given as: 
My confusion is this: once a dividend $D_i$is paid at time $t_i$, it becomes cash and arguably could be reinvested at the risk‐free rate $r$. So I would expect the accumulation for that dividend to be $D_ie^{r(T-t_i)}$. However the formula uses $D_ie^{(r-q)(T-t_i)}$ i.e., effectively using cost‐of‐carry rate $c=r-q$ for the dividends. I understand that for the stock, it should use the net carry rate $c=r-q$. But why does the formula also use $c$ for the accumulation of $D_i$?
Could someone clarify the modelling assumptions or derivation that justify that choice? Thanks in advance!