A user of one of my plugins (Shopkeepers) reported this issue to me: Whenever he interacts with the editor inventory view of the Shopkeepers plugins (a custom chest-typed inventory with items acting as buttons), this plugins reorders the items of that inventory and thereby breaks it.
Custom inventories created by other plugins are probably affected by the same issue.
This plugin would probably have to somehow differentiate between regular chest inventories and custom inventories. There doesn't seem to be a definite solutions to this, but a first heuristic could be to check the inventory's InventoryHolder, and ignore the inventory if this holder is either null, or does not correspond to an actual chest block in the world.