Added a function to lazyInstMgr for recursively getting Instance Dependencies.