\listfiles

\documentclass[english]{article}
\usepackage{imakeidx}
\usepackage{glossaries}
\usepackage{babel}
\begin{document}
Foo.
\end{document}

This bug report is concerning more `tracklang' than `glossaries' package but:

1. the bug tracker list doesn't contain `tracklang',
2. as explained below, if used standalone, an easy workaround does exist for
   `tracklang' but not for `glossaries'.

With the last update of `tracklang' package (2016/10/08 v1.3.1), an error
involving `\shellescape' arises in some circumstances, as in the joined M(n)WE:
  ┌────
  │ ! Missing number, treated as zero.
  │ <to be read again>
  │                    \shellescape
  │ l.279      \ifnum\shellescape
  │                              =0\relax
  │ ?
  └────
In the MWE, it is enough to move `tracklang' before `imakeidx' to fix the
bug. But `tracklang' is loaded by `glossaries', which is recommended to be
loaded after `hyperref', which is one of last packages to be loaded.
