Fixed typo in SchemaManager.prototype.mergeType type[key] was already checked.
Use jquery.extend to make a clone of the object when merging type refs.