Fix for the segfault with WMS TIME patterns (#3795)