fetch-pack: avoid quadratic list insertion in mark_complete