fixed a pretty awful bug (added to the testdata - it was matching stuff
incorrectly when mutliple patterns were involved)
Merge branch 'dev'