Remove left-over code.
Implicitly test 'match first' and 'match all' in more situations.
Fix errors discovered by the additional testing.