Fix undefined offset error for AD group searches

Change-Id: I4fe2d9d73ae288c3268be2b8a56676f8efe5f101