[1.6.x] Fixed gis test to run on non gis-enabled settings

Refs #20998.
Backport of 973502c0 from master.