In bfs: allow threads with higher priority continue after successful match.

This fixes bfs for regexps like "a*" against "a":
"" is the shortest match, but not the right one.