Fixed a bug that was causing relationships to be allowed to relate to themselves.