Merge used chunks into single index instead of making new chunks for each used

Signed-off-by: Gleb Golubitsky <sectoid@gnolltech.org>