Fix a bug in star matcher.

Still seems like there could be a problem with matchchar against $
when $ is an end of string.