This command-line session illustrates the issue:
$ cat /tmp/pf.wt {{#ifexist:xyz | [[1],[2]] | abc | def }} {{#ifexist:xyz | [ [1],[2] ] | abc | def }} $ php bin/parse.php < /tmp/pf.wt <pre data-parsoid='{"dsr":[0,87,1,0]}'>{{#ifexist:xyz | [[1],[2]] | abc | def }} <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"2"},{"k":"3"}]],"dsr":[44,87,null,null]}' data-mw='{"parts":[{"template":{"target":{"wt":"#ifexist:xyz ","function":"ifexist"},"params":{"1":{"wt":" [ [1],[2] ] "},"2":{"wt":" abc "},"3":{"wt":" def "}},"i":0}}]}'>[ [1],[2] ]</span></pre>
This was found while investigating ruwkivoyage rendering failures. On ruwikivoyage, this edit eliminated this tokenization / parse failure at least.