anchor.diff:      value.forEach((key, val) {
         // Encode the key, can now only be ints or strings.
         final keyType = key.runtimeType;
  -      if (keyType is int) {
  +      if (keyType is String) {
  +        _writeString(key);
  +      } else {
           _writeInt(key);
  -      } else {
  -        _writeString(key);
         }
         // Encode the value
         var valType = val.runtimeType;
  +      if (valType is List) {
  +        valType = List;
  +      }
  +      if (valType is Map) {
  +        valType = Map;
  +      }
         switch (valType) {
           case int:
             _writeInt(val);
  
positive.code:     // Check the keys are integers or strings.
      final dynamic keys = value.keys;
      var keysValid = true;
      for (final dynamic element in keys) {
        final elementType = element.runtimeType;
        if ((elementType is! int) || (elementType is! String)) {
          keysValid = false;
          break;
        }
  
negative.code:     var ok = true;
      for (final dynamic element in value) {
        var valType = element.runtimeType;
        if (element is List) {
          valType = List;
        }
        if (element is Map) {
          valType = Map;
        }
        switch (valType) {
          case int:
            _writeInt(element);
  