Thanks to @Willeke, the problem is solved.
Simply add a line delete bcc recipients above the line marked #3# so the bcc recipients list is cleared before the correct recipient is added.
delete bcc recipients
#3#