Fix lifetime bug with some uses of WiredTigerItem