InventoryUtils.similarStacks() will only compare stack's NBT if the compareNBT param is true. Most of the times, that check isn't required.