QueryIndexingTest. Doing cluster safety check after map is filled (backport)

closes #4114