preserve cmd metadata in TextCorpusStreamedWithReplaceableLayers, adjust the test xml file
minor code style fix