+ /*
+ * Store what may have to be updated for the inventory (including
+ * autodestroy if set by something else). Then turn off those flags
+ * so that updates triggered by calling gain_exp() below do not
+ * rearrange the inventory before destroying the scroll in the pack.
+ */
+ BIT_FLAGS inventory_flags = (PU_COMBINE | PU_REORDER | (creature_ptr->update & PU_AUTODESTROY));
+ creature_ptr->update &= ~(PU_COMBINE | PU_REORDER | PU_AUTODESTROY);