#SB-225: Implement index merging

Fixed the broken test.