simplify dynamic deps computation

R=arv
BUG=

Review URL: https://codereview.appspot.com/93520044