properly set lastIndex for hd pockets.