bugfix1124304: memory leak fix in index:next()