Fixed a major error in `CharacterMatrixBuilder.inferStates()`.