Extracted compound matcher helper function
Matcher.IsMatch helper method

This reduces some complexity in the matchers using it. Previously, it was
difficult to figure out exactly how it was working.