(Oops. in this patch you can find a fix for Makefile.am which is in scripts/ dir. (Added pacman-optimize to makefile.am)
Whoops, I forgot to mention that, because patch uses hunks, you can safely delete hunks or entire files from a patch. Because you knew the pacman-optimize was added when it wasn't supposed to (patch does not contain a single change), you could have removed it by hand.