Check existence of #1253 with a test.
Prevent loop in transitive_closure computation (Closes: #1253).