cleanup lambda capture code in ObjectVariantMapper::mkSerializerForStr ()