Maybe that assert in mt.h can have some comment associated, that it may happen in such specific case, so one wouldn't have to dig that deep to figure out what is the cause.
That might save some time from others. Anyway, I guess I learned this already!