Fix a bug relating special patterns '^' and '$'.
Fix a bug of s:resolve_pattern_dictionary().