Correctly set the previous node when exiting from a nesting level in an alternation sequence. Fixes #6