mrmath: fix bug in handling of cross-image operations
mrmath: fix bug in handling of cross-image operations

Fixes #790.

MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3