index-pack: fix race condition with duplicate bases