d_off is the offset of the *next* entry, not the offset of the current entry. (cherry picked from commit 8d20a2f4)