md(4): move type-specific data under union
(cherry picked from commit e91022168101867664e08b4de1f3f09ed4af231c)