ANIMDEFS and ANIMATED lumps assume animated sequences are sequential indices
Both ANIMDEFS and ANIMATED lumps assume the lumps for an animated sequence are sequential in the wad file.
WFALL1 -> 5
WFALL2 -> 6
WFALL2 -> 7
WFALL4 -> 8
Below is an example wad that has both ANIMDEFS and ANIMATED lumps with this problem. the ANIMATED lump in particular causes most of the textures to be animated. Looks like modern ZDoom fixes this by sorting textures by name so the indices are sequential.