Make custom matching more inline with new API.