Fix select with block doesn't return newly built records in has_many association
#28354

kamipo wants to merge kamipo:fix_select_with_block_and_dirty_target into rails:master

We do not currently have an analysis of these two commits