Fix LocalCompiler bug with ill-formed Local.ts.

In the implementation of sequential composition (seq p q) we iterate
over all each element of (x,s) in p, iterate over each action a in p
and then actually do the sequential composition of that x and a with
q. When we got the result, we were Pattern.Map.merge'ing this into an
accumulated Pattern.Map.t, which sometimes resulted in an ill-formed
value.

The fix is to replace the Pattern.Map.merge with `par`, which actually
does a semantic union and preserves well-formedness.

Also added a helper function `check` to test for well-formedness.

-N