Change group after a mailing is scheduled results in mailing still being send to the original members
This is a duplicate of CiviMail and Smart Groups: when does CiviCRM identify the actual list of email recipients?.  I don't think your fix is likely to be accepted upstream for the reasons Lobo provided on that ticket.  That doesn't mean you can't use this fix if it works for you, of course, just that it can't be merged into the upstream code.