Fix problem where we were copying around chunks of memory that were not initialized yet.
Fix problem where we were copying around chunks of memory that
were not initialized yet.

Problem reported by coverity tool, via Will Cohen

pyrovski/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi