diff --git a/base/pike/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.pmod b/head/pike/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.pmod
index 4447b66..d7fe2b2 100644
--- a/base/pike/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.pmod
+++ b/head/pike/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.pmod
@@ -58,9 +58,11 @@ TopLevel TopLevel_from_JSON(mixed json) {
     retval.different_things = json["differentThings"];
     retval.double_value = (float)json["doubleValue"];
     retval.int_value = json["intValue"];
+    foreach (json["mapValue"]; mixed _; mixed value) if (stringp(value)) error("Unexpected string");
     retval.map_value = json["mapValue"];
     retval.name_with_spaces = json["name with spaces"];
     retval.null_value = json["nullValue"];
+    foreach (json["nullableMapValue"]; mixed _; mixed value) if (stringp(value)) error("Unexpected string");
     retval.nullable_map_value = json["nullableMapValue"];
     retval.people = json["people"];
     retval.person = json["person"];
diff --git a/head/schema-pike/test/inputs/schema/class-with-additional.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/class-with-additional.schema/default/TopLevel.pmod
new file mode 100644
index 0000000..c7cea60
--- /dev/null
+++ b/head/schema-pike/test/inputs/schema/class-with-additional.schema/default/TopLevel.pmod
@@ -0,0 +1,40 @@
+// This source has been automatically generated by quicktype.
+// ( https://github.com/quicktype/quicktype )
+//
+// To use this code, simply import it into your project as a Pike module.
+// To JSON-encode your object, you can pass it to `Standards.JSON.encode`
+// or call `encode_json` on it.
+//
+// To decode a JSON string, first pass it to `Standards.JSON.decode`,
+// and then pass the result to `<YourClass>_from_JSON`.
+// It will return an instance of <YourClass>.
+// Bear in mind that these functions have unexpected behavior,
+// and will likely throw an error, if the JSON string does not
+// match the expected interface, even if the JSON itself is valid.
+
+class TopLevel {
+    mapping(string:Map)|mixed map; // json: "map"
+
+    string encode_json() {
+        mapping(string:mixed) json = ([
+            "map" : map,
+        ]);
+
+        return Standards.JSON.encode(json);
+    }
+}
+
+TopLevel TopLevel_from_JSON(mixed json) {
+    TopLevel retval = TopLevel();
+
+    foreach (json["map"]; mixed _; mixed value) if (stringp(value)) error("Unexpected string");
+    retval.map = json["map"];
+
+    return retval;
+}
+
+typedef bool|float Map;
+
+Map Map_from_JSON(mixed json) {
+    return json;
+}
diff --git a/base/schema-pike/test/inputs/schema/vega-lite.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/vega-lite.schema/default/TopLevel.pmod
index 76a374d..254fefe 100644
--- a/base/schema-pike/test/inputs/schema/vega-lite.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/vega-lite.schema/default/TopLevel.pmod
@@ -269,6 +269,7 @@ Config Config_from_JSON(mixed json) {
     retval.padding = json["padding"];
     retval.point = json["point"];
     retval.projection = json["projection"];
+    foreach (json["range"]; mixed _; mixed value) if (stringp(value)) error("Unexpected string");
     retval.range = json["range"];
     retval.rect = json["rect"];
     retval.rule = json["rule"];
