resolve BUGFIX if leafref/instid leaves are changed, resolve them again

Fixes #218
diff --git a/src/resolve.c b/src/resolve.c
index 26247c6..98c1a77 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -6783,6 +6783,7 @@
     assert(type->base == LY_TYPE_LEAFREF);
 
     /* init */
+    leaf->value.leafref = NULL;
     memset(&matches, 0, sizeof matches);
 
     /* EXIT_FAILURE return keeps leaf->value.lefref NULL, handled later */