You're better off using itemlinks and a function to get the position, links are more accurate.
Lua Code:
local function GetBagPosition(itemLink)
for bag = 0, NUM_BAG_SLOTS do
for slot = 1, GetContainerNumSlots(bag) do
if(GetContainerItemLink(bag, slot) == itemLink) then
return bag, slot
end
end
end
end
-- Get bag position of the Hearthstone
local _, itemLink = GetItemInfo(6948)
local bag, slot = GetBagPosition(itemLink)