ExtendedLegend: Don't try to access a non-existing sourceModel
Otherwise we get errors that "index" is not a property of "null".