Fixed issue #9182: Data check integrity function uses too much memory if you have many surveys