diff --git a/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/DocumentComposition/conformance/WeightHeightObservation.structuredefinition.xml b/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/DocumentComposition/conformance/WeightHeightObservation.structuredefinition.xml
index 1067b018..362ea9e5 100644
--- a/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/DocumentComposition/conformance/WeightHeightObservation.structuredefinition.xml
+++ b/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/DocumentComposition/conformance/WeightHeightObservation.structuredefinition.xml
@@ -15,6 +15,7 @@
+
diff --git a/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.check.txt b/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.check.txt
index e4f0629b..60f9cd39 100644
--- a/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.check.txt
+++ b/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.check.txt
@@ -2,13 +2,13 @@ Overall result: FAILURE (13 errors and 1 warnings)
[ERROR] Instance failed constraint bdl-1 "total only when a search or history" (at Bundle, element Bundle(http://example.org/StructureDefinition/DocumentBundle))
[ERROR] Instance count is 1, which is not within the specified cardinality of 0..0 (at Bundle.total, element Bundle(http://example.org/StructureDefinition/DocumentBundle).total)
[ERROR] Encountered a reference (http://example.org/fhir/Practitioner/Hippocrates) of kind 'Referenced', which is not one of the allowed kinds (Bundled). (at Bundle.entry[0].resource[0].author[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).author)
-[ERROR] Element does not validate against any of the expected profiles (http://example.org/StructureDefinition/WeightQuantity, http://example.org/StructureDefinition/HeightQuantity). (at Bundle.entry[1].resource[0].valueQuantity[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation.value[x][Quantity])
-[ERROR] Value '75600' is larger than 200) (at Bundle.entry[1].resource[0].valueQuantity[0].value[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation.value[x][Quantity]->Quantity(http://example.org/StructureDefinition/WeightQuantity).value)
-[ERROR] Value 'http://unitsofmeasurex.org' is not exactly equal to fixed value 'http://unitsofmeasure.org' (at Bundle.entry[1].resource[0].valueQuantity[0].system[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation.value[x][Quantity]->Quantity(http://example.org/StructureDefinition/WeightQuantity).system)
-[ERROR] Value 'g' is not exactly equal to fixed value 'kg' (at Bundle.entry[1].resource[0].valueQuantity[0].code[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation.value[x][Quantity]->Quantity(http://example.org/StructureDefinition/WeightQuantity).code)
-[ERROR] Value '75600' is larger than 350) (at Bundle.entry[1].resource[0].valueQuantity[0].value[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation.value[x][Quantity]->Quantity(http://example.org/StructureDefinition/HeightQuantity).value)
-[ERROR] Value 'g' is not exactly equal to fixed value 'cm' (at Bundle.entry[1].resource[0].valueQuantity[0].code[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation.value[x][Quantity]->Quantity(http://example.org/StructureDefinition/HeightQuantity).code)
-[ERROR] Element is of type 'boolean', which is not one of the allowed choice types ('string','Quantity') (at Bundle.entry[2].resource[0].valueBoolean[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation.value[x][@default])
+[ERROR] Element does not validate against any of the expected profiles (http://example.org/StructureDefinition/WeightQuantity, http://example.org/StructureDefinition/HeightQuantity). (at Bundle.entry[1].resource[0].valueQuantity[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation(http://example.org/StructureDefinition/WeightHeightObservation).value[x][Quantity])
+[ERROR] Value '75600' is larger than 200) (at Bundle.entry[1].resource[0].valueQuantity[0].value[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation(http://example.org/StructureDefinition/WeightHeightObservation).value[x][Quantity]->Quantity(http://example.org/StructureDefinition/WeightQuantity).value)
+[ERROR] Value 'http://unitsofmeasurex.org' is not exactly equal to fixed value 'http://unitsofmeasure.org' (at Bundle.entry[1].resource[0].valueQuantity[0].system[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation(http://example.org/StructureDefinition/WeightHeightObservation).value[x][Quantity]->Quantity(http://example.org/StructureDefinition/WeightQuantity).system)
+[ERROR] Value 'g' is not exactly equal to fixed value 'kg' (at Bundle.entry[1].resource[0].valueQuantity[0].code[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation(http://example.org/StructureDefinition/WeightHeightObservation).value[x][Quantity]->Quantity(http://example.org/StructureDefinition/WeightQuantity).code)
+[ERROR] Value '75600' is larger than 350) (at Bundle.entry[1].resource[0].valueQuantity[0].value[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation(http://example.org/StructureDefinition/WeightHeightObservation).value[x][Quantity]->Quantity(http://example.org/StructureDefinition/HeightQuantity).value)
+[ERROR] Value 'g' is not exactly equal to fixed value 'cm' (at Bundle.entry[1].resource[0].valueQuantity[0].code[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation(http://example.org/StructureDefinition/WeightHeightObservation).value[x][Quantity]->Quantity(http://example.org/StructureDefinition/HeightQuantity).code)
+[ERROR] Element is of type 'boolean', which is not one of the allowed choice types ('string','Quantity') (at Bundle.entry[2].resource[0].valueBoolean[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation(http://example.org/StructureDefinition/WeightHeightObservation).value[x][@default])
[WARNING] Code '10154-3' from system 'http://loinc.org' has incorrect display 'Hoofdklacht', should be 'Chief complaint' (at Bundle.entry[0].resource[0].section[2].code[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.code)
[ERROR] Value 'Misc internal annotations' is too long (maximum length is 20 (at Bundle.entry[0].resource[0].section[4].title[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.title)
[ERROR] Code 'internal notes' from system 'http://example.org/fhir/demo-section-titles' does not exist in the value set 'MainBundle Section title codes' (http://example.org/ValueSet/SectionTitles) (at Bundle.entry[0].resource[0].section[4].code[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.code)
diff --git a/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/issue-165/fhirpkg.lock.json b/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/issue-165/fhirpkg.lock.json
index a3d257b4..fb1c6be6 100644
--- a/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/issue-165/fhirpkg.lock.json
+++ b/test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/issue-165/fhirpkg.lock.json
@@ -1,5 +1,5 @@
{
- "updated": "2024-08-13T12:30:37.888269+02:00",
+ "updated": "2024-08-22T14:30:50.773281+02:00",
"dependencies": {
"kbv.ita.erp": "1.0.2",
"hl7.fhir.r4.core": "4.0.1",
diff --git a/test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle-with-errors.check.txt b/test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.check.txt
similarity index 95%
rename from test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle-with-errors.check.txt
rename to test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.check.txt
index f39c2473..55b7607d 100644
--- a/test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle-with-errors.check.txt
+++ b/test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.check.txt
@@ -1,5 +1,6 @@
-Overall result: FAILURE (13 errors and 1 warnings)
+Overall result: FAILURE (14 errors and 1 warnings)
[ERROR] Instance failed constraint bdl-1 "total only when a search or history" (at Bundle, element Bundle(http://example.org/StructureDefinition/DocumentBundle))
+[ERROR] Instance failed constraint bdl-10 "A document must have a date" (at Bundle, element Bundle(http://example.org/StructureDefinition/DocumentBundle))
[ERROR] Instance count is 1, which is not within the specified cardinality of 0..0 (at Bundle.total, element Bundle(http://example.org/StructureDefinition/DocumentBundle).total)
[ERROR] Encountered a reference (http://example.org/fhir/Practitioner/Hippocrates) of kind 'Referenced', which is not one of the allowed kinds (Bundled). (at Bundle.entry[0].resource[0].author[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).author)
[ERROR] Element does not validate against any of the expected profiles (http://example.org/StructureDefinition/WeightQuantity, http://example.org/StructureDefinition/HeightQuantity). (at Bundle.entry[1].resource[0].valueQuantity[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.entry->Observation(http://example.org/StructureDefinition/WeightHeightObservation).value[x][Quantity])
@@ -12,4 +13,4 @@ Overall result: FAILURE (13 errors and 1 warnings)
[WARNING] Code '10154-3' from system 'http://loinc.org' has incorrect display 'Hoofdklacht', should be 'Chief complaint' (at Bundle.entry[0].resource[0].section[2].code[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.code)
[ERROR] Value 'Misc internal annotations' is too long (maximum length is 20 (at Bundle.entry[0].resource[0].section[4].title[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.title)
[ERROR] Code 'internal notes' from system 'http://example.org/fhir/demo-section-titles' does not exist in the value set 'MainBundle Section title codes' (http://example.org/ValueSet/SectionTitles) (at Bundle.entry[0].resource[0].section[4].code[0], element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section.code)
-[ERROR] Instance count is 2, which is not within the specified cardinality of 1..1 (at Bundle.entry[0].resource[0].section, element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section[vitalSigns])
\ No newline at end of file
+[ERROR] Instance count is 2, which is not within the specified cardinality of 1..1 (at Bundle.entry[0].resource[0].section, element Bundle(http://example.org/StructureDefinition/DocumentBundle).entry.resource->Composition(http://example.org/StructureDefinition/DocumentComposition).section[vitalSigns])
diff --git a/test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.check.xml b/test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.xml
similarity index 100%
rename from test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.check.xml
rename to test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle-with-errors.bundle.xml
diff --git a/test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle.bundle.check.txt b/test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle.bundle.check.txt
index c6bc7df4..66ebabbb 100644
--- a/test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle.bundle.check.txt
+++ b/test/Firely.Fhir.Validation.Compilation.Tests.STU3/TestData/DocumentComposition/data/MainBundle.bundle.check.txt
@@ -1 +1,2 @@
-Overall result: FAILURE (1 errors and 0 warnings) [ERROR] Instance failed constraint bdl-10 "A document must have a date" (at Bundle, element Bundle(http://example.org/StructureDefinition/DocumentBundle))
\ No newline at end of file
+Overall result: FAILURE (1 errors and 0 warnings)
+[ERROR] Instance failed constraint bdl-10 "A document must have a date" (at Bundle, element Bundle(http://example.org/StructureDefinition/DocumentBundle))