Fix wrong index for packages with lots of depends