attachDependencies: add to dependencies instead of replacing