We revisit the calculation of multiple parton scattering of a heavy quark in nuclei within the framework of recently improved high-twist factorization formalism, in which gauge invariance is ensured by a delicate setup of the initial partons transverse momenta. We derive a new result for medium modified heavy quark fragmentation functions in deeply inelastic scattering. It is consistent with the previous calculation of light quark energy loss in the massless limit, but leads to a new correction term in the heavy quark case, which vanishes in the soft gluon radiation limit. We show numerically the significance of the new correction term in the calculation of heavy quark energy loss as compared to previous studies and with soft gluon radiation approximation.