I've just tested your modification but there's another bug:
- when you equip a Hand alone, everything's fine, just one sword strike.
- But if you equip an Offhand weapon only, only one blow is triggered, but it's the MainHand punch, and the Offhand weapon is useless.
EDIT: To be more precise, it's the Offhand weapon's animation that's played, but the Mainhand's damage is applied
(I tested it on a blank project to be sure)...