minor: use ToDId for DId.apply