flvdec: Check index for being valid