Thanks to ais523 for figuring out the exact conditions.
You must be an avenging evangelists You can wield a cockatrice corpse
to good effect, but it has its thrilling double-edged sword. Nice
F
I nevah heard of wielding crocodile corpses. Do you think they are
better than scimitars?
F
Err, cockatrice corpse. This bug also applies to wielding the bell of
opening for silver damage.
A claw attack will be converted into a weapon attack for poly'd
player character, but only when it is the monster form's first attack.
Those monsters start with bite attacks; their claw attacks come later
so don't use any wielded weapon. However, of the monsters you listed,
only jabberwock can actually wield anything; the others are
irrelevant.
Allowing jabberwocks to wear gloves and wield weapons (or corpses)
seems like a bigger bug than the purely hypothetical one that dragons
who hit with cockatrice corpses won't petrify their targets.
In that sense the bug is partially "fixed" because those objects will
never do their specials.
I haven't checked how wepaon enchantment enters damage when
polymorphed, but I wouldn't be surprised if it turns out to be weird.