LaTeX

I was getting the following error from LaTeX:

! Incompatible list can't be unboxed.
\pdf@rect ...\else \expandafter \box \fi \pdf@box 
                                                  \ifdim \dimen@ =\z@ \liter...
l.157 ...tion, \(hyperpage{17}, \hyperpage{16--18}
                                                  , 19,

One search result mentioned that the problem may be tables/floats that are too large to fit on the page. But that wasn’t the problem.

The \hyperpage{16--18} context suggests that it is a problem with indexing in LaTeX; and yes, the problem was that I was nesting the same index element twice:

\index{model completion!implementation|(}

% ... more

\index{model completion!implementation|(}

% ... more 

\index{model completion!implementation|)}

% ... more 

\index{model completion!implementation|)}