[PATCH 1/5] dwrite: Fix array indexing when merging features.