If you have a button item hidden, the remaining event handlers are offset. Let me explain
I have this set of buttons:
Edit Template is Hidden:
If I click the Refresh Queries item, the even handler for Update Invoice W/ Template fires. If I click Cancel invoice then the event for Refresh Queries fires.
If I restore Edit Template then the correct events fire. Seems like the array for the events and the one for the buttons is getting out of sync.