Constancy of the Dimension for RCD(K,N) Spaces via Regularity of Lagrangian Flows