Make the test for dependency cycles less brittle.

Loosens the brittle assumptions of the cycle detection test which implicitly relies on method processing order.  We don't actually care that A or C is found first - they're a cycle - any node will do.  We just care about the correct error being thrown.  Method processing order is simply undefined but happens to be deterministic within a JVM release, and happened to change in Java8.