Fix mapping output to use correct number of channels/cubes no matter what is in mapping file