Fix for http://hub.qgis.org/issues/9020