The Democratic Women’s Caucus pulled support after Republicans amended the legislation to require that the museum exclude transgender women.