Fixed a bug related to dangling constant references with StructureReader and StructureWriter

2 jobs for master in 17 seconds