Fix callstack error when processing installed packages with circular dependencies