Reduced unnecessary copy of shared_ptr when copying String.