Fix Base_createCloneDocument for categories + optimizations