ConTeXt: Matrix inside startalign/stopalign changes specified column alignment

This was a bug in the math matrix code that was introduced when trying to fix a previous limitation (nested matrices did not inherit distance key). It has been fixed in the latest beta (2018.04.04).

For completeness, here is the output corresponding to the MWE in the question:

\starttext
\startformula
    \startalign[n=2,align={right,left}]
        \NC x
        \NC = a ~ long ~ sequence ~ of ~ terms
        \NR
        \NC y
        \NC = ok ~ left
        \NR
        \NC \startmatrix[left={\left\lbrack},right={\right\rbrack}]
                \NC x \NR
                \NC y \NR
            \stopmatrix
        \NC = why ~ right?
        \NR
        \NC y
        \NC = ok ~ left ~ again
        \NR
    \stopalign
\stopformula
\stoptext

enter image description here