Explicitly test dependency cycle detection for self-dependency

/cc @sersut @mcquin