Fix infinite loop when adding email recipients

Commit fbd654083f061fcfcc8dc7229953cc44737889fa introduced a regression
preventing the addition of bugnotes as a PHP Fatal error:  Maximum
execution time of 30 seconds exceeded was triggered.

Fixes #16507