This is no longer true if the field equations involve not only the Ricci tensor but also the Weyl tensor, such as in Lovelock
theories.