Fixed indexing off-by-one bug when appending new blocks to right after existing ones