Bugfix for patterns with wildcards.