#534 make sure multiple patterns are handled correctly