Not sure if it would matter, but can you verify of event.layer.loaded is true before adding it to legend? Not sure what the internals of the ESRI legend look like, but if the layers load event fires after adding it to legend, maybe it's adding it again internally.