[PATCH 4/5] dwrite: Add a helper to apply positional lookup.