updated extendDeep which messed up source objects in some cases