The function uses:
drop_dot_one <- redcap[, c(meta, curr_instr_idx)] %>%
select(-ends_with(".1"))_
to select the variables names in instrument. However, duplicated colunmns are not appended by '.1' now in dplyr. I suggest the following changes:
drop_dot_one <- redcap[, unique(c(meta, curr_instr_idx))]