switch open-coded instances of d_make_root() to new helper