l2P: merge end-of-match tests into the left/right/context tests