Fixed a crash introduced by the repainting fix

tileLayerDrawMarginsChanged should not be emitted for layers that aren't
part of the map for now, since the code handling this signal assumes it
is about a layer of the map.