Tabularx undefined control sequence error with polyglossia Arabic and English language

I am receiving an undefined control sequence for tabularx, I found that adding the Arabic language causes the error, but I don't know how to fix it. My MWE is below:

\documentclass{memoir}

\usepackage{fontspec}
\usepackage{polyglossia}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Arial}
\setmainlanguage{english}
%\setdefaultlanguage{english}
\newfontfamily\englishfont{Linux Libertine}
\newfontfamily\englishfontsf{Calibri}
\newfontfamily\englishfonttt{Inconsolata}

\usepackage{tabularx}
\begin{document}

\begin{tabularx}{\linewidth}{ll}
2&2\\
\end{tabularx}

\end{document}


I am using XeLaTeX.

• This is fixed in the next memoir release, ETA yet unknown, but should be out in time for TeXLive 2018 – daleif Mar 6 '18 at 8:05

This is due to a clash between memoir, tabularx, and bidi. memoir contains its own implementation of tabularx which is incompatible with how bidi tries to patch tabularx.
\documentclass{memoir}