xpath BUGFIX opaque nodes have no XPath position

Fixes #1841
diff --git a/src/xpath.c b/src/xpath.c
index 37d1021..8681a85 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -1360,7 +1360,7 @@
                 LYD_TREE_DFS_continue = 0;
             }
 
-            if ((root_type == LYXP_NODE_ROOT_CONFIG) && (elem->schema->flags & LYS_CONFIG_R)) {
+            if (!elem->schema || ((root_type == LYXP_NODE_ROOT_CONFIG) && (elem->schema->flags & LYS_CONFIG_R))) {
                 /* skip */
                 LYD_TREE_DFS_continue = 1;
             } else {