[PATCH 5/7] dwrite: Use iterator matching for chain substitution.