  We discuss the consistency of a recently proposed class of theories described
by an arbitrary function of the Ricci scalar, the trace of the energy-momentum
tensor and the contraction of the Ricci tensor with the energy-momentum tensor.
We briefly discuss the limitations of including the energy-momentum tensor in
the action, as it is a non fundamental quantity, but a quantity that should be
derived from the action. The fact that theories containing non-linear
contractions of the Ricci tensor usually leads to the presence of pathologies
associated with higher-order equations of motion will be shown to constrain the
stability of this class of theories. We provide a general framework and show
that the conformal mode for these theories generally has higher-order equations
of motion and that non-minimal couplings to the matter fields usually lead to
higher-order equations of motion. In order to illustrate such limitations we
explicitly study the cases of a canonical scalar field, a K-essence field and a
massive vector field. Whereas for the scalar field cases it is possible to find
healthy theories, for the vector field case the presence of instabilities is
unavoidable.
