Refined webhook matching logic.