MSMap.toJSMap delegates to HashMap.toMap, which will recurse into HashMap values, but not MSMap values, rendering the depth parameter useless.