Just in case it may help somebody, I found that nested archive must be initiated with the same compilation unit as the main archive. For the above example:
torch::serialize::OutputArchive nestedarchive(MLPArchive.compilation_unit());