[MD] Make sure treesets of date and number ranges are alwasy built with the proper comparators