I am trying to use 'subequations' environment in my document but it fails to do it right. It appears to happen whenever hebrew language is used somewhere in the document. Here is a MWE:

```
\documentclass{article}

\usepackage{amsmath}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont{Arial}

\begin{document}
\selectlanguage{hebrew}
אבג
\selectlanguage{english}
\begin{subequations}
\begin{align}
    x+y=1\\
    x-y=2
\end{align}
\end{subequations}
\end{document}

```

If the hebrew part is removed the problem disappears.