Also detect self-dependency