Fix coverity 185458: split index variable into two enums