Invalid cast adding link to document

We’re deserializing a layout from XML. When recreating links, at some point after doing the document.Add(link), where link is a GoLabeledLink, an InvalidCastException is thrown. The link subsequently appears placed and labeled as expected. No doubt it’s a bug we’ve introduced, but sofar its eluded us, so on the chance it may be a known issue, we’ll go ahead and ask, and will appreciate any suggestions.