fix regressions on removeLayer when the user deletes a favorite and when he resets localStorage content