Fix some VDLRead bugs and minor clean-up.

While I was implementing the reflect version of VDLRead, I
noticed some bugs in both the vdl.Value and codegen versions of
VDLRead, so I fixed them.

The codegen set/map version was wrong because it was
early-existing when the lenhint is 0, rather than calling
NextEntry until it returned done.  The lenhint handling in
general was wrong for multiple types; we need to ensure we end up
with nil collections if there are no entries.

I also made the codegen version of array faster, by filling the
elem in directly, rather than using a temp variable.  I changed
the vdl.Value version list to add support for our eventual world
where the LenHint really isn't set, and employed a simple growth
strategy.

I also noticed that the type compatibility checks we added make
our benchmarks 20% worse.  We can deal with that later.

MultiPart: 3/4
Change-Id: Ice2c7e85edb8d7e555394008dcba857425dfb8b5
diff --git a/cmd/sb/internal/demodb/demodb.vdl.go b/cmd/sb/internal/demodb/demodb.vdl.go
index 22ca30e..364222e 100644
--- a/cmd/sb/internal/demodb/demodb.vdl.go
+++ b/cmd/sb/internal/demodb/demodb.vdl.go
@@ -198,7 +198,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -206,12 +205,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Street":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -222,7 +217,6 @@
 				return err
 			}
 		case "City":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -233,7 +227,6 @@
 				return err
 			}
 		case "State":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -244,7 +237,6 @@
 				return err
 			}
 		case "Zip":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -553,7 +545,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -561,12 +552,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Rating":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -680,7 +667,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -688,12 +674,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Rating":
-			match++
 			if err = x.Rating.VDLRead(dec); err != nil {
 				return err
 			}
@@ -798,7 +780,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -806,12 +787,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Rating":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1194,7 +1171,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1202,17 +1178,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Agency":
-			match++
 			if err = x.Agency.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Report":
-			match++
 			if err = VDLReadAgencyReport(dec, &x.Report); err != nil {
 				return err
 			}
@@ -1439,7 +1410,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1447,12 +1417,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Name":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1463,7 +1429,6 @@
 				return err
 			}
 		case "Id":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1474,7 +1439,6 @@
 				return err
 			}
 		case "Active":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1485,12 +1449,10 @@
 				return err
 			}
 		case "Address":
-			match++
 			if err = x.Address.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Credit":
-			match++
 			if err = x.Credit.VDLRead(dec); err != nil {
 				return err
 			}
@@ -1680,7 +1642,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1688,12 +1649,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "CustId":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1704,7 +1661,6 @@
 				return err
 			}
 		case "InvoiceNum":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1715,7 +1671,6 @@
 				return err
 			}
 		case "Amount":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1726,7 +1681,6 @@
 				return err
 			}
 		case "ShipTo":
-			match++
 			if err = x.ShipTo.VDLRead(dec); err != nil {
 				return err
 			}
@@ -2055,7 +2009,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -2063,12 +2016,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "B":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2081,7 +2030,6 @@
 				return err
 			}
 		case "Ui16":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2094,7 +2042,6 @@
 				return err
 			}
 		case "Ui32":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2107,7 +2054,6 @@
 				return err
 			}
 		case "Ui64":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2118,7 +2064,6 @@
 				return err
 			}
 		case "I16":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2131,7 +2076,6 @@
 				return err
 			}
 		case "I32":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2144,7 +2088,6 @@
 				return err
 			}
 		case "I64":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2155,7 +2098,6 @@
 				return err
 			}
 		case "F32":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2168,7 +2110,6 @@
 				return err
 			}
 		case "F64":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2512,7 +2453,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -2520,12 +2460,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Name":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2536,7 +2472,6 @@
 				return err
 			}
 		case "TitleOrValue":
-			match++
 			if err = VDLReadTitleOrValueType(dec, &x.TitleOrValue); err != nil {
 				return err
 			}
@@ -2650,7 +2585,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -2658,12 +2592,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Baz":
-			match++
 			if err = x.Baz.VDLRead(dec); err != nil {
 				return err
 			}
@@ -2783,7 +2713,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -2791,12 +2720,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Bar":
-			match++
 			if err = x.Bar.VDLRead(dec); err != nil {
 				return err
 			}
@@ -2888,17 +2813,15 @@
 		case done:
 			return dec.FinishValue()
 		}
-		var elem string
 		if err = dec.StartValue(); err != nil {
 			return err
 		}
-		if elem, err = dec.DecodeString(); err != nil {
+		if x[index], err = dec.DecodeString(); err != nil {
 			return err
 		}
 		if err = dec.FinishValue(); err != nil {
 			return err
 		}
-		x[index] = elem
 		index++
 	}
 }
@@ -3259,7 +3182,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -3267,27 +3189,20 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Arr":
-			match++
 			if err = x.Arr.VDLRead(dec); err != nil {
 				return err
 			}
 		case "ListInt":
-			match++
 			if err = __VDLRead1_list(dec, &x.ListInt); err != nil {
 				return err
 			}
 		case "MySet":
-			match++
 			if err = __VDLRead2_set(dec, &x.MySet); err != nil {
 				return err
 			}
 		case "Map":
-			match++
 			if err = __VDLRead3_map(dec, &x.Map); err != nil {
 				return err
 			}
@@ -3308,10 +3223,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]int32, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -3344,20 +3259,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible set %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[int32]struct{}, len)
-	default:
-		*x = make(map[int32]struct{})
+	var tmpMap map[int32]struct{}
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[int32]struct{}, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key int32
@@ -3374,7 +3285,10 @@
 				return err
 			}
 		}
-		(*x)[key] = struct{}{}
+		if tmpMap == nil {
+			tmpMap = make(map[int32]struct{})
+		}
+		tmpMap[key] = struct{}{}
 	}
 }
 
@@ -3386,20 +3300,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[string]int32, len)
-	default:
-		*x = make(map[string]int32)
+	var tmpMap map[string]int32
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[string]int32, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -3428,7 +3338,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[string]int32)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -3577,7 +3490,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -3585,12 +3497,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Stamp":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -3599,7 +3507,6 @@
 				return err
 			}
 		case "Interval":
-			match++
 			var wire time_2.Duration
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -3866,7 +3773,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -3874,15 +3780,10 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Any":
-			match++
 			// TODO(toddw): implement any
 		case "Maybe":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3902,7 +3803,6 @@
 				}
 			}
 		case "Rec":
-			match++
 			if err = __VDLRead4_map(dec, &x.Rec); err != nil {
 				return err
 			}
@@ -3922,20 +3822,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[Array2String]Recursive, len)
-	default:
-		*x = make(map[Array2String]Recursive)
+	var tmpMap map[Array2String]Recursive
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[Array2String]Recursive, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key Array2String
@@ -3950,7 +3846,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[Array2String]Recursive)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -4324,7 +4223,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -4332,12 +4230,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Name":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -4348,7 +4242,6 @@
 				return err
 			}
 		case "TestTime":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -4357,7 +4250,6 @@
 				return err
 			}
 		case "Score":
-			match++
 			if err = VDLReadActOrSatScore(dec, &x.Score); err != nil {
 				return err
 			}
@@ -4492,7 +4384,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -4500,12 +4391,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "NameOfType":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -4516,7 +4403,6 @@
 				return err
 			}
 		case "Anything":
-			match++
 			// TODO(toddw): implement any
 		default:
 			if err = dec.SkipValue(); err != nil {
diff --git a/cmd/vrpc/internal/internal.vdl.go b/cmd/vrpc/internal/internal.vdl.go
index 6b3e6d0..1d42fbb 100644
--- a/cmd/vrpc/internal/internal.vdl.go
+++ b/cmd/vrpc/internal/internal.vdl.go
@@ -142,7 +142,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -150,12 +149,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "X":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -168,7 +163,6 @@
 				return err
 			}
 		case "Y":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -268,7 +262,6 @@
 		case done:
 			return dec.FinishValue()
 		}
-		var elem int32
 		if err = dec.StartValue(); err != nil {
 			return err
 		}
@@ -276,11 +269,10 @@
 		if err != nil {
 			return err
 		}
-		elem = int32(tmp)
+		x[index] = int32(tmp)
 		if err = dec.FinishValue(); err != nil {
 			return err
 		}
-		x[index] = elem
 		index++
 	}
 }
diff --git a/examples/rps/rps.vdl.go b/examples/rps/rps.vdl.go
index 81214c4..ca7cb12 100644
--- a/examples/rps/rps.vdl.go
+++ b/examples/rps/rps.vdl.go
@@ -135,7 +135,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -143,12 +142,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Id":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -356,7 +351,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -364,12 +358,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "NumRounds":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -382,7 +372,6 @@
 				return err
 			}
 		case "GameType":
-			match++
 			if err = x.GameType.VDLRead(dec); err != nil {
 				return err
 			}
@@ -460,10 +449,12 @@
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
 	for {
-		switch f, err := dec.NextField(); {
-		case err != nil:
+		f, err := dec.NextField()
+		if err != nil {
 			return err
-		case f == "":
+		}
+		switch f {
+		case "":
 			return dec.FinishValue()
 		default:
 			if err = dec.SkipValue(); err != nil {
@@ -741,17 +732,15 @@
 		case done:
 			return dec.FinishValue()
 		}
-		var elem string
 		if err = dec.StartValue(); err != nil {
 			return err
 		}
-		if elem, err = dec.DecodeString(); err != nil {
+		if x[index], err = dec.DecodeString(); err != nil {
 			return err
 		}
 		if err = dec.FinishValue(); err != nil {
 			return err
 		}
-		x[index] = elem
 		index++
 	}
 }
@@ -1057,7 +1046,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1065,17 +1053,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Moves":
-			match++
 			if err = x.Moves.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Comment":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1086,12 +1069,10 @@
 				return err
 			}
 		case "Winner":
-			match++
 			if err = x.Winner.VDLRead(dec); err != nil {
 				return err
 			}
 		case "StartTime":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -1100,7 +1081,6 @@
 				return err
 			}
 		case "EndTime":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -1477,7 +1457,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1485,17 +1464,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Opts":
-			match++
 			if err = x.Opts.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Judge":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1506,17 +1480,14 @@
 				return err
 			}
 		case "Players":
-			match++
 			if err = __VDLRead1_list(dec, &x.Players); err != nil {
 				return err
 			}
 		case "Rounds":
-			match++
 			if err = __VDLRead2_list(dec, &x.Rounds); err != nil {
 				return err
 			}
 		case "StartTime":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -1525,7 +1496,6 @@
 				return err
 			}
 		case "EndTime":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -1534,7 +1504,6 @@
 				return err
 			}
 		case "Winner":
-			match++
 			if err = x.Winner.VDLRead(dec); err != nil {
 				return err
 			}
@@ -1555,10 +1524,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]string, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -1590,10 +1559,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]Round, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -2053,7 +2022,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -2061,12 +2029,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "YouWon":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/examples/tunnel/tunnel.vdl.go b/examples/tunnel/tunnel.vdl.go
index 416375f..fe5dee1 100644
--- a/examples/tunnel/tunnel.vdl.go
+++ b/examples/tunnel/tunnel.vdl.go
@@ -145,7 +145,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -153,12 +152,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Rows":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -171,7 +166,6 @@
 				return err
 			}
 		case "Cols":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -361,7 +355,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -369,12 +362,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "UsePty":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -385,12 +374,10 @@
 				return err
 			}
 		case "Environment":
-			match++
 			if err = __VDLRead1_list(dec, &x.Environment); err != nil {
 				return err
 			}
 		case "WinSize":
-			match++
 			if err = x.WinSize.VDLRead(dec); err != nil {
 				return err
 			}
@@ -411,10 +398,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]string, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -503,10 +490,12 @@
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
 	for {
-		switch f, err := dec.NextField(); {
-		case err != nil:
+		f, err := dec.NextField()
+		if err != nil {
 			return err
-		case f == "":
+		}
+		switch f {
+		case "":
 			return dec.FinishValue()
 		default:
 			if err = dec.SkipValue(); err != nil {
diff --git a/lib/discovery/discovery.vdl.go b/lib/discovery/discovery.vdl.go
index e96f39c..b52cafb 100644
--- a/lib/discovery/discovery.vdl.go
+++ b/lib/discovery/discovery.vdl.go
@@ -676,7 +676,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -684,42 +683,32 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Ad":
-			match++
 			if err = x.Ad.VDLRead(dec); err != nil {
 				return err
 			}
 		case "EncryptionAlgorithm":
-			match++
 			if err = x.EncryptionAlgorithm.VDLRead(dec); err != nil {
 				return err
 			}
 		case "EncryptionKeys":
-			match++
 			if err = __VDLRead1_list(dec, &x.EncryptionKeys); err != nil {
 				return err
 			}
 		case "Hash":
-			match++
 			if err = x.Hash.VDLRead(dec); err != nil {
 				return err
 			}
 		case "DirAddrs":
-			match++
 			if err = __VDLRead2_list(dec, &x.DirAddrs); err != nil {
 				return err
 			}
 		case "Status":
-			match++
 			if err = x.Status.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Lost":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -746,10 +735,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]EncryptionKey, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -775,10 +764,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]string, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
diff --git a/lib/discovery/plugins/ble/testdata/testdata.vdl.go b/lib/discovery/plugins/ble/testdata/testdata.vdl.go
index c704500..f8a8f10 100644
--- a/lib/discovery/plugins/ble/testdata/testdata.vdl.go
+++ b/lib/discovery/plugins/ble/testdata/testdata.vdl.go
@@ -254,7 +254,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -262,17 +261,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "AdInfo":
-			match++
 			if err = x.AdInfo.VDLRead(dec); err != nil {
 				return err
 			}
 		case "GattAttrs":
-			match++
 			if err = __VDLRead1_map(dec, &x.GattAttrs); err != nil {
 				return err
 			}
@@ -292,20 +286,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[string][]byte, len)
-	default:
-		*x = make(map[string][]byte)
+	var tmpMap map[string][]byte
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[string][]byte, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -332,7 +322,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[string][]byte)
+		}
+		tmpMap[key] = elem
 	}
 }
 
diff --git a/lib/discovery/testdata/testdata.vdl.go b/lib/discovery/testdata/testdata.vdl.go
index 1c2498e..8961a8b 100644
--- a/lib/discovery/testdata/testdata.vdl.go
+++ b/lib/discovery/testdata/testdata.vdl.go
@@ -166,7 +166,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -174,17 +173,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "In":
-			match++
 			if err = __VDLRead1_list(dec, &x.In); err != nil {
 				return err
 			}
 		case "Packed":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -211,10 +205,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]string, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -451,7 +445,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -459,22 +452,16 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Algo":
-			match++
 			if err = x.Algo.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Keys":
-			match++
 			if err = __VDLRead2_list(dec, &x.Keys); err != nil {
 				return err
 			}
 		case "Packed":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -501,10 +488,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]discovery.EncryptionKey, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -645,7 +632,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -653,12 +639,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "In":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -669,7 +651,6 @@
 				return err
 			}
 		case "Want":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/lib/raft/raft.vdl.go b/lib/raft/raft.vdl.go
index c9c35c5..332d4ba 100644
--- a/lib/raft/raft.vdl.go
+++ b/lib/raft/raft.vdl.go
@@ -340,7 +340,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -348,22 +347,16 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Term":
-			match++
 			if err = x.Term.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Index":
-			match++
 			if err = x.Index.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Cmd":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -374,7 +367,6 @@
 				return err
 			}
 		case "Type":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/lib/security/bcrypter/bcrypter.vdl.go b/lib/security/bcrypter/bcrypter.vdl.go
index cb6ead7..c09d858 100644
--- a/lib/security/bcrypter/bcrypter.vdl.go
+++ b/lib/security/bcrypter/bcrypter.vdl.go
@@ -223,7 +223,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -231,12 +230,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "PatternId":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -247,7 +242,6 @@
 				return err
 			}
 		case "Bytes":
-			match++
 			if err = __VDLRead1_map(dec, &x.Bytes); err != nil {
 				return err
 			}
@@ -267,20 +261,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[string][]byte, len)
-	default:
-		*x = make(map[string][]byte)
+	var tmpMap map[string][]byte
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[string][]byte, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -307,7 +297,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[string][]byte)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -443,7 +436,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -451,12 +443,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Blessing":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -467,7 +455,6 @@
 				return err
 			}
 		case "Params":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -715,7 +702,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -723,12 +709,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Blessing":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -739,12 +721,10 @@
 				return err
 			}
 		case "Params":
-			match++
 			if err = x.Params.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Keys":
-			match++
 			if err = __VDLRead2_list(dec, &x.Keys); err != nil {
 				return err
 			}
@@ -765,10 +745,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([][]byte, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
diff --git a/lib/security/security.vdl.go b/lib/security/security.vdl.go
index acf6980..0916c0d 100644
--- a/lib/security/security.vdl.go
+++ b/lib/security/security.vdl.go
@@ -163,20 +163,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(blessingRootsState, len)
-	default:
-		*x = make(blessingRootsState)
+	var tmpMap blessingRootsState
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(blessingRootsState, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -197,7 +193,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(blessingRootsState)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -210,10 +209,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]security.BlessingPattern, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -464,7 +463,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -472,12 +470,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Discharge":
-			match++
 			var wire security.WireDischarge
 			if err = security.VDLReadWireDischarge(dec, &wire); err != nil {
 				return err
@@ -486,7 +480,6 @@
 				return err
 			}
 		case "CacheTime":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -966,7 +959,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -974,17 +966,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "PeerBlessings":
-			match++
 			if err = __VDLRead2_map(dec, &x.PeerBlessings); err != nil {
 				return err
 			}
 		case "DefaultBlessings":
-			match++
 			var wire security.WireBlessings
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -993,17 +980,14 @@
 				return err
 			}
 		case "DischargeCache":
-			match++
 			if err = __VDLRead3_map(dec, &x.DischargeCache); err != nil {
 				return err
 			}
 		case "Discharges":
-			match++
 			if err = __VDLRead4_map(dec, &x.Discharges); err != nil {
 				return err
 			}
 		case "CacheKeyFormat":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1031,20 +1015,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[security.BlessingPattern]security.Blessings, len)
-	default:
-		*x = make(map[security.BlessingPattern]security.Blessings)
+	var tmpMap map[security.BlessingPattern]security.Blessings
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[security.BlessingPattern]security.Blessings, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key security.BlessingPattern
@@ -1063,7 +1043,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[security.BlessingPattern]security.Blessings)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -1075,20 +1058,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[dischargeCacheKey]security.Discharge, len)
-	default:
-		*x = make(map[dischargeCacheKey]security.Discharge)
+	var tmpMap map[dischargeCacheKey]security.Discharge
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[dischargeCacheKey]security.Discharge, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key dischargeCacheKey
@@ -1107,7 +1086,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[dischargeCacheKey]security.Discharge)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -1119,20 +1101,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[dischargeCacheKey]CachedDischarge, len)
-	default:
-		*x = make(map[dischargeCacheKey]CachedDischarge)
+	var tmpMap map[dischargeCacheKey]CachedDischarge
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[dischargeCacheKey]CachedDischarge, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key dischargeCacheKey
@@ -1147,7 +1125,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[dischargeCacheKey]CachedDischarge)
+		}
+		tmpMap[key] = elem
 	}
 }
 
diff --git a/lib/security/serialization/serialization.vdl.go b/lib/security/serialization/serialization.vdl.go
index 1f9121e..6c43e5a 100644
--- a/lib/security/serialization/serialization.vdl.go
+++ b/lib/security/serialization/serialization.vdl.go
@@ -111,7 +111,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -119,12 +118,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "ChunkSizeBytes":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/lib/vdl/codegen/golang/reader.go b/lib/vdl/codegen/golang/reader.go
index 8a05c94..64c5487 100644
--- a/lib/vdl/codegen/golang/reader.go
+++ b/lib/vdl/codegen/golang/reader.go
@@ -297,23 +297,22 @@
 			return %[1]sErrorf("array len mismatch, got %%d, want %%T", index, %[2]s)
 		case done:
 			return dec.FinishValue()
-		}
-		var elem %[3]s`, g.Pkg("fmt"), arg.Ref(), typeGo(g.goData, tt.Elem()))
-	s += g.body(tt.Elem(), typedArg("elem", tt.Elem()), false)
-	return s + fmt.Sprintf(`
-		%[1]s[index] = elem
+		}`, g.Pkg("fmt"), arg.Ref())
+	elem := fmt.Sprintf(`%[1]s[index]`, arg.Name)
+	s += g.body(tt.Elem(), typedArg(elem, tt.Elem()), false)
+	return s + `
 		index++
-	}`, arg.Name)
+	}`
 }
 
 func (g *genRead) bodyList(tt *vdl.Type, arg namedArg) string {
 	s := g.checkCompat(tt.Kind(), arg.Ref())
 	s += fmt.Sprintf(`
 	switch len := dec.LenHint(); {
-	case len == 0:
-		%[1]s = nil
 	case len > 0:
 		%[1]s = make(%[2]s, 0, len)
+	default:
+		%[1]s = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -332,20 +331,16 @@
 func (g *genRead) bodySetMap(tt *vdl.Type, arg namedArg) string {
 	s := g.checkCompat(tt.Kind(), arg.Ref())
 	s += fmt.Sprintf(`
-	switch len := dec.LenHint(); {
-	case len == 0:
-		%[1]s = nil
-		return dec.FinishValue()
-	case len > 0:
-		%[1]s = make(%[2]s, len)
-	default:
-		%[1]s = make(%[2]s)
+	var tmpMap %[2]s
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(%[2]s, len)
   }
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			%[1]s = tmpMap
 			return dec.FinishValue()
 		}
 		var key %[3]s
@@ -362,31 +357,15 @@
 		}`
 	}
 	return s + fmt.Sprintf(`
-		%[1]s[key] = %[2]s
-	}`, arg.SafeRef(), elemVar)
+		if tmpMap == nil {
+			tmpMap = make(%[1]s)
+		}
+		tmpMap[key] = %[2]s
+	}`, typeGo(g.goData, tt), elemVar)
 }
 
 func (g *genRead) bodyStruct(tt *vdl.Type, arg namedArg) string {
-	s := g.checkCompat(tt.Kind(), arg.Ref())
-	if tt.NumField() == 0 {
-		// TODO(toddw): Disallow named struct{}, allow unnamed struct{}, and remove
-		// this special-case logic.
-		return s + `
-	for {
-		switch f, err := dec.NextField(); {
-		case err != nil:
-			return err
-		case f == "":
-			return dec.FinishValue()
-		default:
-			if err = dec.SkipValue(); err != nil {
-				return err
-			}
-		}
-	}`
-	}
-	s += fmt.Sprintf(`
-	match := 0
+	s := g.checkCompat(tt.Kind(), arg.Ref()) + `
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -394,15 +373,11 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return %[1]sErrorf("no matching fields in struct %%T, from %%v", %[2]s, dec.Type())
-			}
-			return dec.FinishValue()`, g.Pkg("fmt"), arg.Ref())
+			return dec.FinishValue()`
 	for f := 0; f < tt.NumField(); f++ {
 		field := tt.Field(f)
 		s += fmt.Sprintf(`
-		case %[1]q:
-			match++`, field.Name)
+		case %[1]q:`, field.Name)
 		s += g.body(field.Type, arg.Field(field), false)
 	}
 	return s + `
diff --git a/lib/vdl/testdata/base/base.vdl.go b/lib/vdl/testdata/base/base.vdl.go
index bdacf6e..9954e81 100644
--- a/lib/vdl/testdata/base/base.vdl.go
+++ b/lib/vdl/testdata/base/base.vdl.go
@@ -960,17 +960,15 @@
 		case done:
 			return dec.FinishValue()
 		}
-		var elem bool
 		if err = dec.StartValue(); err != nil {
 			return err
 		}
-		if elem, err = dec.DecodeBool(); err != nil {
+		if x[index], err = dec.DecodeBool(); err != nil {
 			return err
 		}
 		if err = dec.FinishValue(); err != nil {
 			return err
 		}
-		x[index] = elem
 		index++
 	}
 }
@@ -1051,10 +1049,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make(NamedList, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -1155,20 +1153,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible set %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(NamedSet, len)
-	default:
-		*x = make(NamedSet)
+	var tmpMap NamedSet
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(NamedSet, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -1183,7 +1177,10 @@
 				return err
 			}
 		}
-		(*x)[key] = struct{}{}
+		if tmpMap == nil {
+			tmpMap = make(NamedSet)
+		}
+		tmpMap[key] = struct{}{}
 	}
 }
 
@@ -1278,20 +1275,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(NamedMap, len)
-	default:
-		*x = make(NamedMap)
+	var tmpMap NamedMap
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(NamedMap, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -1320,7 +1313,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(NamedMap)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -1473,7 +1469,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1481,12 +1476,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "A":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1497,7 +1488,6 @@
 				return err
 			}
 		case "B":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1508,7 +1498,6 @@
 				return err
 			}
 		case "C":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2688,7 +2677,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -2696,12 +2684,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "A0":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2712,7 +2696,6 @@
 				return err
 			}
 		case "A1":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2725,7 +2708,6 @@
 				return err
 			}
 		case "A2":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2738,7 +2720,6 @@
 				return err
 			}
 		case "A3":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2751,7 +2732,6 @@
 				return err
 			}
 		case "A4":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2762,7 +2742,6 @@
 				return err
 			}
 		case "A5":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2775,7 +2754,6 @@
 				return err
 			}
 		case "A6":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2788,7 +2766,6 @@
 				return err
 			}
 		case "A7":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2801,7 +2778,6 @@
 				return err
 			}
 		case "A8":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2812,7 +2788,6 @@
 				return err
 			}
 		case "A9":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2825,7 +2800,6 @@
 				return err
 			}
 		case "A10":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2836,7 +2810,6 @@
 				return err
 			}
 		case "A11":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2847,15 +2820,12 @@
 				return err
 			}
 		case "A12":
-			match++
 			if err = verror.VDLRead(dec, &x.A12); err != nil {
 				return err
 			}
 		case "A13":
-			match++
 			// TODO(toddw): implement any
 		case "A14":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2866,72 +2836,58 @@
 				return err
 			}
 		case "B0":
-			match++
 			if err = x.B0.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B1":
-			match++
 			if err = x.B1.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B2":
-			match++
 			if err = x.B2.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B3":
-			match++
 			if err = x.B3.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B4":
-			match++
 			if err = x.B4.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B5":
-			match++
 			if err = x.B5.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B6":
-			match++
 			if err = x.B6.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B7":
-			match++
 			if err = x.B7.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B8":
-			match++
 			if err = x.B8.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B9":
-			match++
 			if err = x.B9.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B10":
-			match++
 			if err = x.B10.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B11":
-			match++
 			if err = x.B11.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B12":
-			match++
 			if err = x.B12.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B13":
-			match++
 			if err = VDLReadNamedUnion(dec, &x.B13); err != nil {
 				return err
 			}
@@ -3693,7 +3649,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -3701,12 +3656,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "A0":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3717,7 +3668,6 @@
 				return err
 			}
 		case "A1":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3730,7 +3680,6 @@
 				return err
 			}
 		case "A2":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3743,7 +3692,6 @@
 				return err
 			}
 		case "A3":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3756,7 +3704,6 @@
 				return err
 			}
 		case "A4":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3767,7 +3714,6 @@
 				return err
 			}
 		case "A5":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3780,7 +3726,6 @@
 				return err
 			}
 		case "A6":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3793,7 +3738,6 @@
 				return err
 			}
 		case "A7":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3806,7 +3750,6 @@
 				return err
 			}
 		case "A8":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3817,7 +3760,6 @@
 				return err
 			}
 		case "A9":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3830,7 +3772,6 @@
 				return err
 			}
 		case "A10":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3841,7 +3782,6 @@
 				return err
 			}
 		case "A11":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3852,62 +3792,50 @@
 				return err
 			}
 		case "B0":
-			match++
 			if err = x.B0.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B1":
-			match++
 			if err = x.B1.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B2":
-			match++
 			if err = x.B2.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B3":
-			match++
 			if err = x.B3.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B4":
-			match++
 			if err = x.B4.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B5":
-			match++
 			if err = x.B5.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B6":
-			match++
 			if err = x.B6.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B7":
-			match++
 			if err = x.B7.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B8":
-			match++
 			if err = x.B8.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B9":
-			match++
 			if err = x.B9.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B10":
-			match++
 			if err = x.B10.VDLRead(dec); err != nil {
 				return err
 			}
 		case "B13":
-			match++
 			if err = x.B13.VDLRead(dec); err != nil {
 				return err
 			}
@@ -4000,11 +3928,9 @@
 		case done:
 			return dec.FinishValue()
 		}
-		var elem Scalars
-		if err = elem.VDLRead(dec); err != nil {
+		if err = x[index].VDLRead(dec); err != nil {
 			return err
 		}
-		x[index] = elem
 		index++
 	}
 }
@@ -4568,7 +4494,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -4576,32 +4501,24 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "A0":
-			match++
 			if err = x.A0.VDLRead(dec); err != nil {
 				return err
 			}
 		case "A1":
-			match++
 			if err = x.A1.VDLRead(dec); err != nil {
 				return err
 			}
 		case "A2":
-			match++
 			if err = __VDLRead1_list(dec, &x.A2); err != nil {
 				return err
 			}
 		case "A3":
-			match++
 			if err = __VDLRead2_set(dec, &x.A3); err != nil {
 				return err
 			}
 		case "A4":
-			match++
 			if err = __VDLRead3_map(dec, &x.A4); err != nil {
 				return err
 			}
@@ -4622,10 +4539,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]Scalars, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -4650,20 +4567,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible set %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[KeyScalars]struct{}, len)
-	default:
-		*x = make(map[KeyScalars]struct{})
+	var tmpMap map[KeyScalars]struct{}
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[KeyScalars]struct{}, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key KeyScalars
@@ -4672,7 +4585,10 @@
 				return err
 			}
 		}
-		(*x)[key] = struct{}{}
+		if tmpMap == nil {
+			tmpMap = make(map[KeyScalars]struct{})
+		}
+		tmpMap[key] = struct{}{}
 	}
 }
 
@@ -4684,20 +4600,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[string]Scalars, len)
-	default:
-		*x = make(map[string]Scalars)
+	var tmpMap map[string]Scalars
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[string]Scalars, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -4718,7 +4630,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[string]Scalars)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -4803,11 +4718,9 @@
 		case done:
 			return dec.FinishValue()
 		}
-		var elem Composites
-		if err = elem.VDLRead(dec); err != nil {
+		if err = x[index].VDLRead(dec); err != nil {
 			return err
 		}
-		x[index] = elem
 		index++
 	}
 }
@@ -5739,7 +5652,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -5747,32 +5659,24 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "A0":
-			match++
 			if err = x.A0.VDLRead(dec); err != nil {
 				return err
 			}
 		case "A1":
-			match++
 			if err = x.A1.VDLRead(dec); err != nil {
 				return err
 			}
 		case "A2":
-			match++
 			if err = __VDLRead4_list(dec, &x.A2); err != nil {
 				return err
 			}
 		case "A3":
-			match++
 			if err = __VDLRead5_map(dec, &x.A3); err != nil {
 				return err
 			}
 		case "A4":
-			match++
 			if err = __VDLRead6_map(dec, &x.A4); err != nil {
 				return err
 			}
@@ -5793,10 +5697,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]Composites, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -5821,20 +5725,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[string]Composites, len)
-	default:
-		*x = make(map[string]Composites)
+	var tmpMap map[string]Composites
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[string]Composites, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -5855,7 +5755,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[string]Composites)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -5867,20 +5770,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[KeyScalars][]map[string]Composites, len)
-	default:
-		*x = make(map[KeyScalars][]map[string]Composites)
+	var tmpMap map[KeyScalars][]map[string]Composites
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[KeyScalars][]map[string]Composites, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key KeyScalars
@@ -5895,7 +5794,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[KeyScalars][]map[string]Composites)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -5908,10 +5810,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]map[string]Composites, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -6050,7 +5952,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -6058,12 +5959,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "A":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -6076,7 +5973,6 @@
 				return err
 			}
 		case "B":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -6193,7 +6089,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -6201,12 +6096,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Args":
-			match++
 			if err = x.Args.VDLRead(dec); err != nil {
 				return err
 			}
diff --git a/lib/vdl/testdata/nativedep/nativedep.vdl.go b/lib/vdl/testdata/nativedep/nativedep.vdl.go
index 2c94932..93feef6 100644
--- a/lib/vdl/testdata/nativedep/nativedep.vdl.go
+++ b/lib/vdl/testdata/nativedep/nativedep.vdl.go
@@ -285,7 +285,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -293,12 +292,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "A":
-			match++
 			var wire nativetest_2.WireString
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -307,7 +302,6 @@
 				return err
 			}
 		case "B":
-			match++
 			var wire nativetest_2.WireMapStringInt
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -316,7 +310,6 @@
 				return err
 			}
 		case "C":
-			match++
 			var wire nativetest_2.WireTime
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -325,7 +318,6 @@
 				return err
 			}
 		case "D":
-			match++
 			var wire nativetest_2.WireSamePkg
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -334,7 +326,6 @@
 				return err
 			}
 		case "E":
-			match++
 			var wire nativetest_2.WireMultiImport
 			if err = wire.VDLRead(dec); err != nil {
 				return err
diff --git a/lib/vdl/testdata/nativetest/nativetest.vdl.go b/lib/vdl/testdata/nativetest/nativetest.vdl.go
index b2d5900..c0834d8 100644
--- a/lib/vdl/testdata/nativetest/nativetest.vdl.go
+++ b/lib/vdl/testdata/nativetest/nativetest.vdl.go
@@ -767,7 +767,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -775,12 +774,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "A":
-			match++
 			var wire WireString
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -789,7 +784,6 @@
 				return err
 			}
 		case "B":
-			match++
 			var wire WireMapStringInt
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -798,7 +792,6 @@
 				return err
 			}
 		case "C":
-			match++
 			var wire WireTime
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -807,7 +800,6 @@
 				return err
 			}
 		case "D":
-			match++
 			var wire WireSamePkg
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -816,7 +808,6 @@
 				return err
 			}
 		case "E":
-			match++
 			var wire WireMultiImport
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -825,7 +816,6 @@
 				return err
 			}
 		case "F":
-			match++
 			if err = x.F.VDLRead(dec); err != nil {
 				return err
 			}
diff --git a/runtime/internal/flow/conn/conn.vdl.go b/runtime/internal/flow/conn/conn.vdl.go
index d9705e2..ec7cceb 100644
--- a/runtime/internal/flow/conn/conn.vdl.go
+++ b/runtime/internal/flow/conn/conn.vdl.go
@@ -164,7 +164,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -172,12 +171,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Blessings":
-			match++
 			var wire security.WireBlessings
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -186,7 +181,6 @@
 				return err
 			}
 		case "BKey":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -385,7 +379,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -393,17 +386,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Ciphertexts":
-			match++
 			if err = __VDLRead1_list(dec, &x.Ciphertexts); err != nil {
 				return err
 			}
 		case "BKey":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -430,10 +418,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]bcrypter.WireCiphertext, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -668,7 +656,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -676,17 +663,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Discharges":
-			match++
 			if err = __VDLRead2_list(dec, &x.Discharges); err != nil {
 				return err
 			}
 		case "DKey":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -697,7 +679,6 @@
 				return err
 			}
 		case "BKey":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -724,10 +705,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]security.Discharge, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -926,7 +907,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -934,17 +914,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Ciphertexts":
-			match++
 			if err = __VDLRead1_list(dec, &x.Ciphertexts); err != nil {
 				return err
 			}
 		case "DKey":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -955,7 +930,6 @@
 				return err
 			}
 		case "BKey":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/runtime/internal/rpc/stress/stress.vdl.go b/runtime/internal/rpc/stress/stress.vdl.go
index 70093ef..5e1a343 100644
--- a/runtime/internal/rpc/stress/stress.vdl.go
+++ b/runtime/internal/rpc/stress/stress.vdl.go
@@ -175,7 +175,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -183,12 +182,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "ABool":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -199,7 +194,6 @@
 				return err
 			}
 		case "AInt64":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -210,7 +204,6 @@
 				return err
 			}
 		case "AListOfBytes":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -405,7 +398,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -413,12 +405,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "SumCount":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -429,7 +417,6 @@
 				return err
 			}
 		case "SumStreamCount":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -440,7 +427,6 @@
 				return err
 			}
 		case "BytesRecv":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -451,7 +437,6 @@
 				return err
 			}
 		case "BytesSent":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/runtime/protocols/vine/vine.vdl.go b/runtime/protocols/vine/vine.vdl.go
index ba68762..96b2bf1 100644
--- a/runtime/protocols/vine/vine.vdl.go
+++ b/runtime/protocols/vine/vine.vdl.go
@@ -144,7 +144,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -152,12 +151,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Dialer":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -168,7 +163,6 @@
 				return err
 			}
 		case "Acceptor":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -315,7 +309,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -323,12 +316,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Reachable":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -339,7 +328,6 @@
 				return err
 			}
 		case "Discoverable":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/services/agent/agent.vdl.go b/services/agent/agent.vdl.go
index 939db11..37c3b5e 100644
--- a/services/agent/agent.vdl.go
+++ b/services/agent/agent.vdl.go
@@ -172,7 +172,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -180,12 +179,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "MinVersion":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -198,7 +193,6 @@
 				return err
 			}
 		case "MaxVersion":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -367,7 +361,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -375,12 +368,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Id":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -391,7 +380,6 @@
 				return err
 			}
 		case "Method":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -402,7 +390,6 @@
 				return err
 			}
 		case "NumArgs":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -577,7 +564,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -585,12 +571,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Id":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -601,12 +583,10 @@
 				return err
 			}
 		case "Err":
-			match++
 			if err = verror.VDLRead(dec, &x.Err); err != nil {
 				return err
 			}
 		case "NumArgs":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/services/ben/ben.vdl.go b/services/ben/ben.vdl.go
index 8685b9e..41a385a 100644
--- a/services/ben/ben.vdl.go
+++ b/services/ben/ben.vdl.go
@@ -171,7 +171,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -179,12 +178,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Architecture":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -195,7 +190,6 @@
 				return err
 			}
 		case "Description":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -206,7 +200,6 @@
 				return err
 			}
 		case "ClockSpeedMhz":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -348,7 +341,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -356,12 +348,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Name":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -372,7 +360,6 @@
 				return err
 			}
 		case "Version":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -542,7 +529,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -550,22 +536,16 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Cpu":
-			match++
 			if err = x.Cpu.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Os":
-			match++
 			if err = x.Os.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Label":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -897,7 +877,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -905,12 +884,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Name":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -921,7 +896,6 @@
 				return err
 			}
 		case "Iterations":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -932,7 +906,6 @@
 				return err
 			}
 		case "NanoSecsPerOp":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -943,7 +916,6 @@
 				return err
 			}
 		case "AllocsPerOp":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -954,7 +926,6 @@
 				return err
 			}
 		case "AllocedBytesPerOp":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -965,7 +936,6 @@
 				return err
 			}
 		case "MegaBytesPerSec":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -976,7 +946,6 @@
 				return err
 			}
 		case "Parallelism":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/services/groups/internal/server/server.vdl.go b/services/groups/internal/server/server.vdl.go
index f9bbc3b..fe338eb 100644
--- a/services/groups/internal/server/server.vdl.go
+++ b/services/groups/internal/server/server.vdl.go
@@ -202,7 +202,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -210,17 +209,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Perms":
-			match++
 			if err = x.Perms.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Entries":
-			match++
 			if err = __VDLRead1_set(dec, &x.Entries); err != nil {
 				return err
 			}
@@ -240,20 +234,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible set %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[groups.BlessingPatternChunk]struct{}, len)
-	default:
-		*x = make(map[groups.BlessingPatternChunk]struct{})
+	var tmpMap map[groups.BlessingPatternChunk]struct{}
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[groups.BlessingPatternChunk]struct{}, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key groups.BlessingPatternChunk
@@ -262,7 +252,10 @@
 				return err
 			}
 		}
-		(*x)[key] = struct{}{}
+		if tmpMap == nil {
+			tmpMap = make(map[groups.BlessingPatternChunk]struct{})
+		}
+		tmpMap[key] = struct{}{}
 	}
 }
 
diff --git a/services/identity/identity.vdl.go b/services/identity/identity.vdl.go
index d95f3d6..5283e9c 100644
--- a/services/identity/identity.vdl.go
+++ b/services/identity/identity.vdl.go
@@ -167,7 +167,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -175,17 +174,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Names":
-			match++
 			if err = __VDLRead1_list(dec, &x.Names); err != nil {
 				return err
 			}
 		case "PublicKey":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -212,10 +206,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]string, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
diff --git a/services/profile/profile.vdl.go b/services/profile/profile.vdl.go
index e24cbb4..ee18d2a 100644
--- a/services/profile/profile.vdl.go
+++ b/services/profile/profile.vdl.go
@@ -172,7 +172,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -180,12 +179,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Name":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -196,7 +191,6 @@
 				return err
 			}
 		case "MajorVersion":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -207,7 +201,6 @@
 				return err
 			}
 		case "MinorVersion":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -526,7 +519,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -534,12 +526,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Label":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -550,7 +538,6 @@
 				return err
 			}
 		case "Description":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -561,22 +548,18 @@
 				return err
 			}
 		case "Arch":
-			match++
 			if err = x.Arch.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Os":
-			match++
 			if err = x.Os.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Format":
-			match++
 			if err = x.Format.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Libraries":
-			match++
 			if err = __VDLRead1_set(dec, &x.Libraries); err != nil {
 				return err
 			}
@@ -596,20 +579,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible set %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[Library]struct{}, len)
-	default:
-		*x = make(map[Library]struct{})
+	var tmpMap map[Library]struct{}
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[Library]struct{}, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key Library
@@ -618,7 +597,10 @@
 				return err
 			}
 		}
-		(*x)[key] = struct{}{}
+		if tmpMap == nil {
+			tmpMap = make(map[Library]struct{})
+		}
+		tmpMap[key] = struct{}{}
 	}
 }
 
diff --git a/services/role/roled/internal/internal.vdl.go b/services/role/roled/internal/internal.vdl.go
index 847ae02..bbe7b29 100644
--- a/services/role/roled/internal/internal.vdl.go
+++ b/services/role/roled/internal/internal.vdl.go
@@ -366,7 +366,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -374,22 +373,16 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "ImportMembers":
-			match++
 			if err = __VDLRead1_list(dec, &x.ImportMembers); err != nil {
 				return err
 			}
 		case "Members":
-			match++
 			if err = __VDLRead2_list(dec, &x.Members); err != nil {
 				return err
 			}
 		case "Extend":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -400,7 +393,6 @@
 				return err
 			}
 		case "Audit":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -411,7 +403,6 @@
 				return err
 			}
 		case "Expiry":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -422,7 +413,6 @@
 				return err
 			}
 		case "Peers":
-			match++
 			if err = __VDLRead2_list(dec, &x.Peers); err != nil {
 				return err
 			}
@@ -443,10 +433,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]string, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -478,10 +468,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]security.BlessingPattern, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
diff --git a/services/stats/stats.vdl.go b/services/stats/stats.vdl.go
index f75fae1..90da4da 100644
--- a/services/stats/stats.vdl.go
+++ b/services/stats/stats.vdl.go
@@ -142,7 +142,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -150,12 +149,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "LowBound":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -166,7 +161,6 @@
 				return err
 			}
 		case "Count":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -449,7 +443,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -457,12 +450,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Count":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -473,7 +462,6 @@
 				return err
 			}
 		case "Sum":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -484,7 +472,6 @@
 				return err
 			}
 		case "Min":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -495,7 +482,6 @@
 				return err
 			}
 		case "Max":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -506,7 +492,6 @@
 				return err
 			}
 		case "Buckets":
-			match++
 			if err = __VDLRead1_list(dec, &x.Buckets); err != nil {
 				return err
 			}
@@ -527,10 +512,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]HistogramBucket, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
diff --git a/services/syncbase/localblobstore/localblobstore.vdl.go b/services/syncbase/localblobstore/localblobstore.vdl.go
index 4f31493..6e25734 100644
--- a/services/syncbase/localblobstore/localblobstore.vdl.go
+++ b/services/syncbase/localblobstore/localblobstore.vdl.go
@@ -203,7 +203,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -211,17 +210,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "OwnerShares":
-			match++
 			if err = x.OwnerShares.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Referenced":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -230,7 +224,6 @@
 				return err
 			}
 		case "Accessed":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -343,7 +336,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -351,12 +343,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Priority":
-			match++
 			if err = x.Priority.VDLRead(dec); err != nil {
 				return err
 			}
diff --git a/services/syncbase/server/interfaces/interfaces.vdl.go b/services/syncbase/server/interfaces/interfaces.vdl.go
index 708d193..ed9b480 100644
--- a/services/syncbase/server/interfaces/interfaces.vdl.go
+++ b/services/syncbase/server/interfaces/interfaces.vdl.go
@@ -121,20 +121,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(GenVector, len)
-	default:
-		*x = make(GenVector)
+	var tmpMap GenVector
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(GenVector, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key uint64
@@ -161,7 +157,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(GenVector)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -260,20 +259,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(Knowledge, len)
-	default:
-		*x = make(Knowledge)
+	var tmpMap Knowledge
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(Knowledge, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -294,7 +289,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(Knowledge)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -685,7 +683,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -693,12 +690,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Id":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -709,7 +702,6 @@
 				return err
 			}
 		case "Gen":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -720,7 +712,6 @@
 				return err
 			}
 		case "RecType":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -733,7 +724,6 @@
 				return err
 			}
 		case "ObjId":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -744,7 +734,6 @@
 				return err
 			}
 		case "CurVers":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -755,12 +744,10 @@
 				return err
 			}
 		case "Parents":
-			match++
 			if err = __VDLRead1_list(dec, &x.Parents); err != nil {
 				return err
 			}
 		case "UpdTime":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -769,7 +756,6 @@
 				return err
 			}
 		case "Delete":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -780,7 +766,6 @@
 				return err
 			}
 		case "BatchId":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -791,7 +776,6 @@
 				return err
 			}
 		case "BatchCount":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -818,10 +802,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]string, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -1000,7 +984,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1008,17 +991,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Metadata":
-			match++
 			if err = x.Metadata.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Value":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1543,7 +1521,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1551,12 +1528,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Name":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1567,7 +1540,6 @@
 				return err
 			}
 		case "SpecVersion":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1578,12 +1550,10 @@
 				return err
 			}
 		case "Spec":
-			match++
 			if err = x.Spec.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Creator":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1594,17 +1564,14 @@
 				return err
 			}
 		case "DbId":
-			match++
 			if err = x.DbId.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Status":
-			match++
 			if err = x.Status.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Joiners":
-			match++
 			if err = __VDLRead2_map(dec, &x.Joiners); err != nil {
 				return err
 			}
@@ -1624,20 +1591,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[string]syncbase.SyncgroupMemberInfo, len)
-	default:
-		*x = make(map[string]syncbase.SyncgroupMemberInfo)
+	var tmpMap map[string]syncbase.SyncgroupMemberInfo
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[string]syncbase.SyncgroupMemberInfo, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -1658,7 +1621,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[string]syncbase.SyncgroupMemberInfo)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -1790,7 +1756,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1798,17 +1763,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "DbId":
-			match++
 			if err = x.DbId.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Gvs":
-			match++
 			if err = x.Gvs.VDLRead(dec); err != nil {
 				return err
 			}
@@ -2032,7 +1992,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -2040,22 +1999,16 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "DbId":
-			match++
 			if err = x.DbId.VDLRead(dec); err != nil {
 				return err
 			}
 		case "SgIds":
-			match++
 			if err = __VDLRead3_set(dec, &x.SgIds); err != nil {
 				return err
 			}
 		case "Gvs":
-			match++
 			if err = x.Gvs.VDLRead(dec); err != nil {
 				return err
 			}
@@ -2075,20 +2028,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible set %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[GroupId]struct{}, len)
-	default:
-		*x = make(map[GroupId]struct{})
+	var tmpMap map[GroupId]struct{}
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[GroupId]struct{}, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key GroupId
@@ -2097,7 +2046,10 @@
 				return err
 			}
 		}
-		(*x)[key] = struct{}{}
+		if tmpMap == nil {
+			tmpMap = make(map[GroupId]struct{})
+		}
+		tmpMap[key] = struct{}{}
 	}
 }
 
@@ -2636,7 +2588,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -2644,12 +2595,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "DevType":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2662,7 +2609,6 @@
 				return err
 			}
 		case "Distance":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -2675,7 +2621,6 @@
 				return err
 			}
 		case "ServerTime":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -2787,20 +2732,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(SgPriorities, len)
-	default:
-		*x = make(SgPriorities)
+	var tmpMap SgPriorities
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(SgPriorities, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key GroupId
@@ -2815,7 +2756,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(SgPriorities)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -2917,7 +2861,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -2925,12 +2868,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "SgPriorities":
-			match++
 			if err = x.SgPriorities.VDLRead(dec); err != nil {
 				return err
 			}
@@ -3040,7 +2979,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -3048,12 +2986,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Hash":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3169,7 +3103,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -3177,12 +3110,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Data":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3306,7 +3235,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -3314,12 +3242,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "SendTs":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -3624,7 +3548,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -3632,12 +3555,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "OrigTs":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -3646,7 +3565,6 @@
 				return err
 			}
 		case "RecvTs":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -3655,7 +3573,6 @@
 				return err
 			}
 		case "SendTs":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -3664,7 +3581,6 @@
 				return err
 			}
 		case "LastNtpTs":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -3673,7 +3589,6 @@
 				return err
 			}
 		case "NumReboots":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3686,7 +3601,6 @@
 				return err
 			}
 		case "NumHops":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -3800,20 +3714,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(BlobSharesBySyncgroup, len)
-	default:
-		*x = make(BlobSharesBySyncgroup)
+	var tmpMap BlobSharesBySyncgroup
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(BlobSharesBySyncgroup, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key GroupId
@@ -3836,7 +3746,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(BlobSharesBySyncgroup)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -4003,7 +3916,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -4011,12 +3923,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "WhenSeen":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -4025,7 +3933,6 @@
 				return err
 			}
 		case "IsProxy":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -4036,7 +3943,6 @@
 				return err
 			}
 		case "IsServer":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -4147,20 +4053,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(PeerToLocationDataMap, len)
-	default:
-		*x = make(PeerToLocationDataMap)
+	var tmpMap PeerToLocationDataMap
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(PeerToLocationDataMap, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -4181,7 +4083,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(PeerToLocationDataMap)
+		}
+		tmpMap[key] = elem
 	}
 }
 
@@ -4334,7 +4239,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -4342,17 +4246,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Locations":
-			match++
 			if err = x.Locations.VDLRead(dec); err != nil {
 				return err
 			}
 		case "SgIds":
-			match++
 			if err = __VDLRead3_set(dec, &x.SgIds); err != nil {
 				return err
 			}
diff --git a/services/syncbase/server/server.vdl.go b/services/syncbase/server/server.vdl.go
index 1506483..ff27817 100644
--- a/services/syncbase/server/server.vdl.go
+++ b/services/syncbase/server/server.vdl.go
@@ -145,7 +145,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -153,12 +152,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Version":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -169,7 +164,6 @@
 				return err
 			}
 		case "Perms":
-			match++
 			if err = x.Perms.VDLRead(dec); err != nil {
 				return err
 			}
@@ -335,7 +329,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -343,17 +336,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Id":
-			match++
 			if err = x.Id.VDLRead(dec); err != nil {
 				return err
 			}
 		case "RootDir":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -364,7 +352,6 @@
 				return err
 			}
 		case "Engine":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -596,7 +583,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -604,17 +590,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Id":
-			match++
 			if err = x.Id.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Version":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -625,12 +606,10 @@
 				return err
 			}
 		case "Perms":
-			match++
 			if err = x.Perms.VDLRead(dec); err != nil {
 				return err
 			}
 		case "SchemaMetadata":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -758,20 +737,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(CollectionPerms, len)
-	default:
-		*x = make(CollectionPerms)
+	var tmpMap CollectionPerms
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(CollectionPerms, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -792,7 +767,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(CollectionPerms)
+		}
+		tmpMap[key] = elem
 	}
 }
 
diff --git a/services/syncbase/signing/signing.vdl.go b/services/syncbase/signing/signing.vdl.go
index 4932644..1e1df25 100644
--- a/services/syncbase/signing/signing.vdl.go
+++ b/services/syncbase/signing/signing.vdl.go
@@ -591,7 +591,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -599,17 +598,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Data":
-			match++
 			if err = __VDLRead1_list(dec, &x.Data); err != nil {
 				return err
 			}
 		case "BlessingsHash":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -620,12 +614,10 @@
 				return err
 			}
 		case "AuthorSigned":
-			match++
 			if err = x.AuthorSigned.VDLRead(dec); err != nil {
 				return err
 			}
 		case "IsValidated":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -636,7 +628,6 @@
 				return err
 			}
 		case "ValidatorDataHash":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -647,7 +638,6 @@
 				return err
 			}
 		case "ValidatorSigned":
-			match++
 			if err = x.ValidatorSigned.VDLRead(dec); err != nil {
 				return err
 			}
@@ -668,10 +658,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]Item, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -835,7 +825,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -843,17 +832,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Names":
-			match++
 			if err = __VDLRead2_list(dec, &x.Names); err != nil {
 				return err
 			}
 		case "MarshalledPublicKey":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -880,10 +864,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]string, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
diff --git a/services/syncbase/store/watchable/watchable.vdl.go b/services/syncbase/store/watchable/watchable.vdl.go
index 759588e..c7853e2 100644
--- a/services/syncbase/store/watchable/watchable.vdl.go
+++ b/services/syncbase/store/watchable/watchable.vdl.go
@@ -117,7 +117,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -125,12 +124,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Key":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -278,7 +273,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -286,12 +280,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Start":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -302,7 +292,6 @@
 				return err
 			}
 		case "Limit":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -452,7 +441,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -460,12 +448,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Key":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -476,7 +460,6 @@
 				return err
 			}
 		case "Version":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -592,7 +575,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -600,12 +582,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Key":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -814,7 +792,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -822,15 +799,10 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Op":
-			match++
 			// TODO(toddw): implement any
 		case "CommitTimestamp":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -841,7 +813,6 @@
 				return err
 			}
 		case "FromSync":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -852,7 +823,6 @@
 				return err
 			}
 		case "Continued":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/services/syncbase/vclock/vclock.vdl.go b/services/syncbase/vclock/vclock.vdl.go
index e4e4d64..60404e3 100644
--- a/services/syncbase/vclock/vclock.vdl.go
+++ b/services/syncbase/vclock/vclock.vdl.go
@@ -312,7 +312,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -320,12 +319,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "SystemTimeAtBoot":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -334,7 +329,6 @@
 				return err
 			}
 		case "Skew":
-			match++
 			var wire time_2.Duration
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -343,7 +337,6 @@
 				return err
 			}
 		case "ElapsedTimeSinceBoot":
-			match++
 			var wire time_2.Duration
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -352,7 +345,6 @@
 				return err
 			}
 		case "LastNtpTs":
-			match++
 			var wire time_2.Time
 			if err = wire.VDLRead(dec); err != nil {
 				return err
@@ -361,7 +353,6 @@
 				return err
 			}
 		case "NumReboots":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -374,7 +365,6 @@
 				return err
 			}
 		case "NumHops":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/services/syncbase/vsync/testdata/blobtestsvdl.vdl.go b/services/syncbase/vsync/testdata/blobtestsvdl.vdl.go
index c532294..d8287ec 100644
--- a/services/syncbase/vsync/testdata/blobtestsvdl.vdl.go
+++ b/services/syncbase/vsync/testdata/blobtestsvdl.vdl.go
@@ -142,7 +142,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -150,12 +149,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Info":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -166,7 +161,6 @@
 				return err
 			}
 		case "Br":
-			match++
 			if err = x.Br.VDLRead(dec); err != nil {
 				return err
 			}
@@ -545,7 +539,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -553,12 +546,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Info":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -569,7 +558,6 @@
 				return err
 			}
 		case "Bs":
-			match++
 			if err = __VDLRead1_set(dec, &x.Bs); err != nil {
 				return err
 			}
@@ -589,20 +577,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible set %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[syncbase.BlobRef]struct{}, len)
-	default:
-		*x = make(map[syncbase.BlobRef]struct{})
+	var tmpMap map[syncbase.BlobRef]struct{}
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[syncbase.BlobRef]struct{}, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key syncbase.BlobRef
@@ -611,7 +595,10 @@
 				return err
 			}
 		}
-		(*x)[key] = struct{}{}
+		if tmpMap == nil {
+			tmpMap = make(map[syncbase.BlobRef]struct{})
+		}
+		tmpMap[key] = struct{}{}
 	}
 }
 
@@ -789,7 +776,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -797,12 +783,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Info":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -813,7 +795,6 @@
 				return err
 			}
 		case "Baa":
-			match++
 			if err = __VDLRead2_list(dec, &x.Baa); err != nil {
 				return err
 			}
@@ -834,10 +815,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]*vom.RawBytes, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -1028,7 +1009,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1036,12 +1016,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Info":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1052,7 +1028,6 @@
 				return err
 			}
 		case "S":
-			match++
 			if err = __VDLRead3_set(dec, &x.S); err != nil {
 				return err
 			}
@@ -1072,20 +1047,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible set %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[string]struct{}, len)
-	default:
-		*x = make(map[string]struct{})
+	var tmpMap map[string]struct{}
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[string]struct{}, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -1100,7 +1071,10 @@
 				return err
 			}
 		}
-		(*x)[key] = struct{}{}
+		if tmpMap == nil {
+			tmpMap = make(map[string]struct{})
+		}
+		tmpMap[key] = struct{}{}
 	}
 }
 
@@ -1255,7 +1229,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1263,12 +1236,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Info":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1279,7 +1248,6 @@
 				return err
 			}
 		case "Bo":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
diff --git a/services/syncbase/vsync/vsync.vdl.go b/services/syncbase/vsync/vsync.vdl.go
index 4246742..aa93541 100644
--- a/services/syncbase/vsync/vsync.vdl.go
+++ b/services/syncbase/vsync/vsync.vdl.go
@@ -113,7 +113,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -121,12 +120,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Id":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -302,7 +297,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -310,22 +304,16 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "GenVecs":
-			match++
 			if err = x.GenVecs.VDLRead(dec); err != nil {
 				return err
 			}
 		case "SgGenVecs":
-			match++
 			if err = x.SgGenVecs.VDLRead(dec); err != nil {
 				return err
 			}
 		case "IsPaused":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -495,7 +483,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -503,17 +490,12 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Metadata":
-			match++
 			if err = x.Metadata.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Pos":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -770,7 +752,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -778,12 +759,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "NumLocalJoiners":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -796,7 +773,6 @@
 				return err
 			}
 		case "Watched":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -807,7 +783,6 @@
 				return err
 			}
 		case "RemotePublisher":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -818,7 +793,6 @@
 				return err
 			}
 		case "SyncPending":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -829,7 +803,6 @@
 				return err
 			}
 		case "PendingGenVec":
-			match++
 			if err = x.PendingGenVec.VDLRead(dec); err != nil {
 				return err
 			}
@@ -1126,7 +1099,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1134,12 +1106,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Level":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1150,12 +1118,10 @@
 				return err
 			}
 		case "Parents":
-			match++
 			if err = __VDLRead1_list(dec, &x.Parents); err != nil {
 				return err
 			}
 		case "Logrec":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1166,7 +1132,6 @@
 				return err
 			}
 		case "BatchId":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1177,7 +1142,6 @@
 				return err
 			}
 		case "Deleted":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1188,7 +1152,6 @@
 				return err
 			}
 		case "PermId":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1199,7 +1162,6 @@
 				return err
 			}
 		case "PermVers":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1226,10 +1188,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]string, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -1509,7 +1471,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -1517,22 +1478,16 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Objects":
-			match++
 			if err = __VDLRead2_map(dec, &x.Objects); err != nil {
 				return err
 			}
 		case "LinkedObjects":
-			match++
 			if err = __VDLRead2_map(dec, &x.LinkedObjects); err != nil {
 				return err
 			}
 		case "Count":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -1558,20 +1513,16 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible map %T, from %v", *x, dec.Type())
 	}
-	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
-		return dec.FinishValue()
-	case len > 0:
-		*x = make(map[string]string, len)
-	default:
-		*x = make(map[string]string)
+	var tmpMap map[string]string
+	if len := dec.LenHint(); len > 0 {
+		tmpMap = make(map[string]string, len)
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
 		case err != nil:
 			return err
 		case done:
+			*x = tmpMap
 			return dec.FinishValue()
 		}
 		var key string
@@ -1598,7 +1549,10 @@
 				return err
 			}
 		}
-		(*x)[key] = elem
+		if tmpMap == nil {
+			tmpMap = make(map[string]string)
+		}
+		tmpMap[key] = elem
 	}
 }
 
diff --git a/services/syncbase/watchable/watchable.vdl.go b/services/syncbase/watchable/watchable.vdl.go
index 83615fc..4f612aa 100644
--- a/services/syncbase/watchable/watchable.vdl.go
+++ b/services/syncbase/watchable/watchable.vdl.go
@@ -192,7 +192,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -200,22 +199,16 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "SgId":
-			match++
 			if err = x.SgId.VDLRead(dec); err != nil {
 				return err
 			}
 		case "Prefixes":
-			match++
 			if err = __VDLRead1_list(dec, &x.Prefixes); err != nil {
 				return err
 			}
 		case "Remove":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -242,10 +235,10 @@
 		return fmt.Errorf("incompatible list %T, from %v", *x, dec.Type())
 	}
 	switch len := dec.LenHint(); {
-	case len == 0:
-		*x = nil
 	case len > 0:
 		*x = make([]string, 0, len)
+	default:
+		*x = nil
 	}
 	for {
 		switch done, err := dec.NextEntry(); {
@@ -404,7 +397,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -412,12 +404,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "Key":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -428,7 +416,6 @@
 				return err
 			}
 		case "Version":
-			match++
 			if err = dec.StartValue(); err != nil {
 				return err
 			}
@@ -641,7 +628,6 @@
 	if (dec.StackDepth() == 1 || dec.IsAny()) && !vdl.Compatible(vdl.TypeOf(*x), dec.Type()) {
 		return fmt.Errorf("incompatible struct %T, from %v", *x, dec.Type())
 	}
-	match := 0
 	for {
 		f, err := dec.NextField()
 		if err != nil {
@@ -649,12 +635,8 @@
 		}
 		switch f {
 		case "":
-			if match == 0 && dec.Type().NumField() > 0 {
-				return fmt.Errorf("no matching fields in struct %T, from %v", *x, dec.Type())
-			}
 			return dec.FinishValue()
 		case "RequestType":
-			match++
 			if err = x.RequestType.VDLRead(dec); err != nil {
 				return err
 			}