Invariant sets for systems of partial differential equations I. Parabolic equations