LPS-42672 resolve the recursion issue when more than 1 dependency exists