Hi, I was looking into this bug. Seems like the problem was when it polymorphed back, the amulet of changing had puton_worn_item(otmp) called before it was placed back into the inventory. So when useup was called (in response to the amulet disintegrating) freeinv couldn't find anything in the inventory that matched.

This patch seems to work:
--- zap.c       2010-11-19 12:10:08.000000000 -0800
+++ /home/michael/slashem/orig/slashem-0.0.7E7F3/src/zap.c      2006-12-30 05:08:31.000000000 -0800
@@ -1618,6 +1618,7 @@
            if (obj_location == OBJ_INVENT) {
                remove_worn_item(obj, TRUE);
                setworn(otmp, otmp->owornmask);
+               puton_worn_item(otmp);
                if (otmp->owornmask & LEFT_RING)
                    uleft = otmp;
                if (otmp->owornmask & RIGHT_RING)
@@ -1679,7 +1680,6 @@
-           puton_worn_item(otmp);
        else if (obj_location == OBJ_MINVENT) {
            /* Pended update of monster intrinsics */

Though the code in zap.c is laid out a little oddly (in my mind at least). The block that I moved the puton_worn_item to is entered in much the same way as the block that I pulled it from. Could the code be made a little cleaner by moving     replace_object(obj, otmp);
up above the     if (obj_location == OBJ_INVENT || obj_location == OBJ_MINVENT) {
then moving the code in the     if (obj_location == OBJ_INVENT) {
in with it. Though the largely aesthetic change would probably cause unwanted pain. so probably not.

Anywho, hope it helps.