merge-recursive: enforce rule that index matches head before merging