additional fixes related to mapserver/mapserver#4633