Emails are sent multiple times

We use the email function in ERPNext to send confirmation to a customer after their order has been processed. Lately we’ve had several reclamations because emails are sent several times each.
I’ve tried to trace the misbehaviour and found that if we use CC or BCC it affects the number of mails.

If there’s only one recipient, then only one mail is sent.
If there’s two recipients, mails are sent twice (for each recipient).
If there’s three recipients, mails are sent three times (for each recipient)

I tried to analyze the code in /home/frappe/frappe-bench/apps/frappe/frappe/email/ but as I have very little experience in Python, I’m having hard time to find the exact spot which might affect this.

Please, could someone with more experience test this out and point me to the right direction in order to fix this behaviour.

The versions:
ERPNext: v10.1.54 (master)
Frappe Framework: v10.1.49 (master)

This seems to be solved with the latest updates. :grinning: