Fix initialization order in Document::Document