Handle layers that have a title different from layer name, fixes http://hub.qgis.org/issues/7186