Adding tests for mapserver/mapserver#4717 to master.