Consistency of the kinetic mass action law with thermodynamics