Add branch change support in slim.dependencies

Change-Id: I5257b9a6cdc6e807b1f2feb008cd9dec5501880c