change VariableDocument.implicit_document to run through as_a()