If you make a call to map.get requesting map elements URLs, only the URLs defined for the map element will be returned. But, if you use the "expandUrls" parameter it will also URLs defined for a map. Needless to say, this design is very bad, an "expand*" parameter must not affect what elements are returned.
One of the ways to resolve this issue is to return map URLs for each element in a separate "mapUrls" property, and let the "expandUrls" parameter control, whether macros in both "urls" and "mapUrls" must be expanded.