Fix NH-3316

Tests covering NH3316
Fix some other bad unit tests
BagOfNestedComponentsWithParentTest - check that parent element is mapped as expected.
Merge branch 'darrenkopp-NH-3316' into 3.4.x