fix crash in mapserver (introduced with 1215d0b01)