I figured out a solution:
Use changem or another similar function to replace the segmentation labels with ordinal labels from 0 (empty label) to length(unique(labels)). I implemented the approach as given in the below code snippet, and got appropriate output. I'll leave the question up in case anyone has a different and more elegant solution for future users.
newsegvis = squeeze(newvol(:,:,100));
oldsegvis = squeeze(oldvol(:,:,100));
newsegs = unique(newsegvis);
oldsegs = unique(oldsegvis);
newsegvis = changem(newsegvis,(0:length(newsegs)-1)',newsegs);
oldsegvis = changem(oldsegvis,(0:length(oldsegs)-1)',oldsegs);