LPS-32174 Optimize and fix verifyContentSearch logic, old way didn't take into account different groupIds