0024535: Bad type cast in TDocStd_Document::Update()