\textrm{{}d} produces {}d which is not consistent with real TeX (link to texlive.net)
\textrm{{}d}
{}d