Added method and tests for a faster path to return the first match.