schema compile amend BUGFIX deviated node needs pointers to operations

Fixes #1727
diff --git a/src/schema_compile_amend.c b/src/schema_compile_amend.c
index 92d69d2..2c7d403 100644
--- a/src/schema_compile_amend.c
+++ b/src/schema_compile_amend.c
@@ -610,14 +610,18 @@
     LY_CHECK_GOTO(ret = lysp_node_dup(ctx, mem, pnode), cleanup);
 
     if (with_links) {
-        /* copy also parent and child pointers */
+        /* copy also parent, child, action, and notification pointers */
         ((struct lysp_node *)mem)->parent = pnode->parent;
         switch (pnode->nodetype) {
         case LYS_CONTAINER:
             ((struct lysp_node_container *)mem)->child = ((struct lysp_node_container *)pnode)->child;
+            ((struct lysp_node_container *)mem)->actions = ((struct lysp_node_container *)pnode)->actions;
+            ((struct lysp_node_container *)mem)->notifs = ((struct lysp_node_container *)pnode)->notifs;
             break;
         case LYS_LIST:
             ((struct lysp_node_list *)mem)->child = ((struct lysp_node_list *)pnode)->child;
+            ((struct lysp_node_list *)mem)->actions = ((struct lysp_node_list *)pnode)->actions;
+            ((struct lysp_node_list *)mem)->notifs = ((struct lysp_node_list *)pnode)->notifs;
             break;
         case LYS_CHOICE:
             ((struct lysp_node_choice *)mem)->child = ((struct lysp_node_choice *)pnode)->child;
@@ -1517,9 +1521,13 @@
     switch (dev_pnode->nodetype) {
     case LYS_CONTAINER:
         ((struct lysp_node_container *)dev_pnode)->child = NULL;
+        ((struct lysp_node_container *)dev_pnode)->actions = NULL;
+        ((struct lysp_node_container *)dev_pnode)->notifs = NULL;
         break;
     case LYS_LIST:
         ((struct lysp_node_list *)dev_pnode)->child = NULL;
+        ((struct lysp_node_list *)dev_pnode)->actions = NULL;
+        ((struct lysp_node_list *)dev_pnode)->notifs = NULL;
         break;
     case LYS_CHOICE:
         ((struct lysp_node_choice *)dev_pnode)->child = NULL;