rpearce: Switch to using set for all_dependencies to avoid duplicates,
  small clean up