Correctly handle embedded document inlines