[PECOFF] Optimize the writer a bit by removing a loop.