postgresql – Postgres uuid_generate_v1() fails with INSERT from SELECT

I’m having trouble getting the uuid_generate_v1/v4() functions to work when doing a bulk insert:

create schema if not exists uuid_default_bug;

-- ensure uuid extension is added
create extension if not exists "uuid-ossp" with schema public;
alter extension "uuid-ossp" set schema public;

-- add source table & value
drop table if exists uuid_default_bug.test_source;
create table uuid_default_bug.test_source (
    name text not null
);
insert into uuid_default_bug.test_source (name) values ('test1');
insert into uuid_default_bug.test_source (name) values ('test2');

-- add target table
drop table if exists uuid_default_bug.test_target;
create table uuid_default_bug.test_target (
    -- set the uuid_generate function to use for the default value:
    id uuid not null default public.uuid_generate_v1(),
    name text
);


-- This line fails:
insert into uuid_default_bug.test_target select name from uuid_default_bug.test_source;

-- (42804) ERROR: column "id" is of type uuid but expression is of type text
-- Hint: You will need to rewrite or cast the expression. Position: 49

Note the last line insert into ... select fails with (42804) ERROR: column "id" is of type uuid but expression is of type text but both the id and the uuid_generate_v1() are of type uuid. Is there a way to fix this?

This happens on Postgres 12.5 and 13.2 with uuid-ossp v1.1.