Make the test for dependency cycles less brittle.