The role of thermodynamics and kinetics in multiphase ternary diffusion