Merge 'new' code that doesn't pass sanity tests with old code that does. Use conditional defines OLD or NEW in m.hdr and m.s
to pick which to use.