[DDMD] Use explicit MOD type to avoid narrowing conversions from unsigned int