Fix WildcardPatternFilter not always working correctly when part of patt...

...ern is present multiple times in input string.