safer index merging