Rather than slicing the array later to remove the first element (the current app), can you slice the array when it is returned? That would make more sense to me since I wouldn't expect to get back the same app as a dependency.