BUG: fix bug that can occur with some data (e.g., label/template/MNI-Poly-AMU_WM.nii.gz)
BUG: fix bug that can occur with some data (e.g., label/template/MNI-Poly-AMU_WM.nii.gz)

Former-commit-id: 529be81bc34f72068f06ec828a560c75e83273a5 [formerly 77f36330224c52f64b886377850b8871a38d998a]
Former-commit-id: 2df9d045748500796092648b639b974252617733
Former-commit-id: 17d291b8a8d7296eb6ea298b89706c13730ee6c7
neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox