Merged Shibashis' change in a way that helps the damn thing
compile. Will now attend to the semantics of the "number of
alternations" thingy.