Yes, now when I know about problem it is easy to solve, but I think it should be solved on API level, because anything else is just a workaround of the bug in this MDL function.
Or at least it should be documented - that is why I posted - to inform others...
Thanks