when recursively installing, check that package isn't already installed before recursing