Reset PathString index for pattern matching, added test