While the DME and MB operate on very different frequency ranges, that doesn't mean one won't interfere with the other. The DME transmits and receives while the MB only receives. The DME transmiting could cause interference issues with the MB. Are the chances of that happening very great? Probably not. However, most install manuals for certificated aircraft/equipment recommend a minimum of 18" between antennas.
My .02
-EDIT- Didn't see your spacing was 24". That is PLENTY of space between the two.