MODE-2212 Corrected the way namespaces are read from storage

Corrected the behavior in the way that ChildReferences.iterator() works; this wasn't noticed before because we rarely use this method (most of the time we look up children by key). Also used @cbeer's test case demonstrating failed persistence of generated namespaces, which now passes.