Index: /issm/trunk-jpl/src/m/classes/model.js
===================================================================
--- /issm/trunk-jpl/src/m/classes/model.js	(revision 22446)
+++ /issm/trunk-jpl/src/m/classes/model.js	(revision 22447)
@@ -566,44 +566,37 @@
 			 *
 			 */
-			var md1;
-
-			switch (typeof obj) {
-				case "object":
-					if (obj === null) {
-						// null => null
-						md1 = null;
-					} else {
-						switch (toString.call(obj)) {
-							case "[object Array]":
-								// It's an array, create a new array with
-								// deep copies of the entries
-								md1 = obj.map(deepCopy);
-								break;
-							case "[object Date]":
-								// Clone the date
-								md1 = new Date(obj);
-								break;
-							case "[object RegExp]":
-								// Clone the RegExp
-								md1 = new RegExp(obj);
-								break;
-							// ...probably a few others
-							default:
-								// Some other kind of object, deep-copy its
-								// properties into a new object
-								md1 = Object.keys(obj).reduce(function(prev, key) {
-									prev[key] = deepCopy(obj[key]);
-									return prev;
-								}, {});
-								break;
+			function recursiveDeepCopy(obj) {
+				var returnValue;
+
+				switch (typeof obj) {
+					case "object":
+						if (obj === null) {
+							// null => null
+							returnValue = null;
+						} else {
+							switch (toString.call(obj)) {
+								case "[object Array]":
+									// It's an array, create a new array with deep copies of the entries
+									returnValue = obj.map(recursiveDeepCopy);
+									break;
+								default:
+									// Some other kind of object, deep-copy its properties into a new object
+									returnValue = Object.keys(obj).reduce(function(prev, key) {
+										prev[key] = recursiveDeepCopy(obj[key]);
+										return prev;
+									}, {});
+									break;
+							}
 						}
-					}
-					break;
-				default:
-					// It's a primitive, copy via assignment
-					md1 = obj;
-					break;
-			}
-			return md1;
+						break;
+					default:
+						// It's a primitive, copy via assignment
+						returnValue = obj;
+						break;
+				}
+				return returnValue;
+			}
+			
+			return recursiveDeepCopy(md);
 		} /*}}}*/
 	//properties
