Essentially, it is the same problem as this question.
I am using footnotes and endnotes together, so I want to change endnotes to roman. The solution given when the question was asked two years ago was to add
\robustify{\textlatin}
to the preamble, so it would look like
\documentclass[10pt,twoside, openright]{book}
\usepackage[greek, english]{babel}
\usepackage{endnotes, etoolbox}
\robustify{\textlatin}
\renewcommand{\theendnote}{\roman{endnote}}
\begin{document}
Once\endnote{Or maybe twice} upon a time $t\ge0\ldots$.
\theendnotes
\end{document}
This works in my TeXLive '15 environment, but doesn't work if I use TeXLive '17.
I get a message
./text.tex:11: Incomplete \iffalse; all text was ignored after line
11. <inserted text>
\fi l.11 Once\endnote{Or maybe twice}
upon a time $t\ge0\ldots$.
Any idea on how can I make it work with TeXLive '17? I use MacTex, macOS 10.13.2.