With:
\documentclass{article}
\usepackage[hebrew,english]{babel}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
You get:
! Missing \endcsname inserted.
<to be read again>
\protect
l.6 \end
{document}
?
The suggestions here do not work around the problem.