Fix incorrectly dropped procedure

The user_ids_from_cohort_and_master_group was dropped in a migration in
[405d7121f59fd1a48b9f1c81e71e727bb3858dc5]