Issue #25125:find unused temporary item number