parser yang BUGFIX missing condition in leafref

If yang-version is 1.0, require-instance is not allow in leafref.
diff --git a/src/parser_yang.c b/src/parser_yang.c
index 873e2cf..939c299 100644
--- a/src/parser_yang.c
+++ b/src/parser_yang.c
@@ -1124,6 +1124,11 @@
                 typ->type->info.inst.req = req;
             }
         } else if (typ->type->base == LY_TYPE_LEAFREF) {
+            /* require-instance only YANG 1.1 */
+            if (typ->type->info.lref.req && (module->version < 2)) {
+                LOGVAL(LYE_INSTMT, LY_VLOG_NONE, NULL, "require-instance");
+                goto error;
+            }
             /* flag resolving for later use */
             if (!tpdftype) {
                 for (siter = parent; siter && siter->nodetype != LYS_GROUPING; siter = lys_parent(siter));