refs #10384 fixing GCC warning and optimizing memory usage

by taking unit conversion allocator out of the loop.
Merge branch 'feature/10384_flatBackground' into develop