Fix retrieve updated dependency info for peer/optional dependencies