Prevent content with a content reference from referencing itself

Entity reference for Drupal 7 has a ready-to-be-committed patch for this:

And a “Needs work” patch for Drupal core:

Add setting to EntityReferenceSelection plugins to prevent references to referencing entity

Ah but there’s a contrib fix:

Needed for Find It: A service provider or content editor is prevented from creating a circular reference between organizations.

as part of A content editor can associate an organization with a parent organization.