Use the layer type when adding a part to a featureless entry. Fix #8459

Fix http://hub.qgis.org/issues/8459