Improve dependency fetching

Change-Id: If6a0b021a5148b52d2b2db651b3996766e55d691
Merge "Improve dependency fetching"