Handle documents extending non-document classes