Fix #7444

Please see http://hub.qgis.org/issues/7444