Make dependency resolution recursive.

Change-Id: If434e01a72b1681c3048b4fb7c58ff31d6b949ee
Merge "Make dependency resolution recursive."