Guard against invalid svg state