Adding recursion for explicit component dependency generation