fix a DI circular reference recognition bug

plus add ability to detect deeper circular references eg: A -> B -> C -> B