MDL-43395 dml: detect invalid limit params

Help developers to find bugs by throwing a DEBUG_DEVELOPER message
rather than ignoring this case completely.