We study the optimal tax system in a dynamic model where differences in wages induce differences in inheritances, and the transition from parent ability to child ability is described by a Markov chain. We characterize expected inheritances in the steady state and show that the Atkinson-Stiglitz result on the redundancy of indirect taxes does not hold in this framework. In particular, given an optimal income tax, a bequest tax as well as a consumption tax are potential instruments for additional redistribution. For the bequest tax the sign of the overall welfare effect depends on the reaction of bequests and on inequality aversion, while for the consumption tax the sign is always positive because the distorting effect is outweighed by the induced increase in wealth accumulation. A necessary condition for a positive welfare effect is the empirically validated relation that more able individuals on average have more able parents than less able individuals.